Workflow Engine .NET  2
Public Member Functions | Static Public Member Functions | Public Attributes | Properties | List of all members
OptimaJet.Workflow.Core.Runtime.WorkflowCommand Class Reference

Represents a workflow command for use in an application More...

Public Member Functions

object GetParameter (string name)
 Get the parameter value More...
 
void SetParameter (string name, object value)
 Set parameter value More...
 
void AddIdentity (string identityId)
 Add an identity in Identities collection More...
 
bool Validate (out string errorMessage)
 Validates a command More...
 
void SetAllParametersToDefault ()
 Sets all value of parameters to their default values More...
 
void SetParameterToDefault (string name)
 Sets value of parameter with specific name to default value More...
 

Static Public Member Functions

static WorkflowCommand Create (Guid processId, TransitionDefinition transitionDefinition, ProcessDefinition processDefinition, Func< string, Type, object > deserializer=null)
 Create a workflow command object More...
 

Public Attributes

List< CommandParameterParameters = new List<CommandParameter>()
 Parameters list of the command CommandParameter More...
 

Properties

Guid ProcessId [get, set]
 Process id for which command is valid More...
 
string ValidForActivityName [get, set]
 Activity name for which command is valid More...
 
string ValidForStateName [get, set]
 If true mean that command is valid for a subprocess More...
 
TransitionClassifier Classifier [get, set]
 Transition classifier for command TransitionClassifier More...
 
bool IsForSubprocess [get, set]
 If true means that the command was recieved from a subprocess More...
 
IEnumerable< string > Identities [get]
 List of user ids which can execute the command More...
 
string CommandName [get, set]
 System name of the command More...
 
string LocalizedName [get, set]
 Localized name of the command More...
 

Detailed Description

Represents a workflow command for use in an application

Member Function Documentation

◆ AddIdentity()

void OptimaJet.Workflow.Core.Runtime.WorkflowCommand.AddIdentity ( string  identityId)

Add an identity in Identities collection

Parameters
identityId

◆ Create()

static WorkflowCommand OptimaJet.Workflow.Core.Runtime.WorkflowCommand.Create ( Guid  processId,
TransitionDefinition  transitionDefinition,
ProcessDefinition  processDefinition,
Func< string, Type, object >  deserializer = null 
)
static

Create a workflow command object

Parameters
processIdProcees id
transitionDefinitionCommand transition TransitionDefinition
processDefinitionProcessDefinition object which represent parsed workflow scheme
deserializerFunction for deserialize InitialValue of Parameter from JSON
Returns
WorkflowCommand object

◆ GetParameter()

object OptimaJet.Workflow.Core.Runtime.WorkflowCommand.GetParameter ( string  name)

Get the parameter value

Parameters
nameParameter name
Returns
Parameter value

◆ SetAllParametersToDefault()

void OptimaJet.Workflow.Core.Runtime.WorkflowCommand.SetAllParametersToDefault ( )

Sets all value of parameters to their default values

◆ SetParameter()

void OptimaJet.Workflow.Core.Runtime.WorkflowCommand.SetParameter ( string  name,
object  value 
)

Set parameter value

Parameters
nameParameter name
valueParameter value

◆ SetParameterToDefault()

void OptimaJet.Workflow.Core.Runtime.WorkflowCommand.SetParameterToDefault ( string  name)

Sets value of parameter with specific name to default value

Parameters
nameName of parameter

◆ Validate()

bool OptimaJet.Workflow.Core.Runtime.WorkflowCommand.Validate ( out string  errorMessage)

Validates a command

Parameters
errorMessageErrors summary
Returns
true if the command is valid

Member Data Documentation

◆ Parameters

List<CommandParameter> OptimaJet.Workflow.Core.Runtime.WorkflowCommand.Parameters = new List<CommandParameter>()

Parameters list of the command CommandParameter

Property Documentation

◆ Classifier

TransitionClassifier OptimaJet.Workflow.Core.Runtime.WorkflowCommand.Classifier
getset

Transition classifier for command TransitionClassifier

◆ CommandName

string OptimaJet.Workflow.Core.Runtime.WorkflowCommand.CommandName
getset

System name of the command

◆ Identities

IEnumerable<string> OptimaJet.Workflow.Core.Runtime.WorkflowCommand.Identities
get

List of user ids which can execute the command

◆ IsForSubprocess

bool OptimaJet.Workflow.Core.Runtime.WorkflowCommand.IsForSubprocess
getset

If true means that the command was recieved from a subprocess

◆ LocalizedName

string OptimaJet.Workflow.Core.Runtime.WorkflowCommand.LocalizedName
getset

Localized name of the command

◆ ProcessId

Guid OptimaJet.Workflow.Core.Runtime.WorkflowCommand.ProcessId
getset

Process id for which command is valid

◆ ValidForActivityName

string OptimaJet.Workflow.Core.Runtime.WorkflowCommand.ValidForActivityName
getset

Activity name for which command is valid

◆ ValidForStateName

string OptimaJet.Workflow.Core.Runtime.WorkflowCommand.ValidForStateName
getset

If true mean that command is valid for a subprocess

Activity name for which command is valid