Class WorkflowCommand
OptimaJet.Workflow.Core.Runtime.WorkflowCommand
Represents a workflow command for use in an application
Namespace: OptimaJet.Workflow.Core.Runtime
public sealed class WorkflowCommandInheritance
- System.Object
Properties
Name
Type
ProcessId #GuidProcess id for which command is valid
ValidForActivityName #StringActivity name for which command is valid
ValidForStateName #StringActivity name for which command is valid
Classifier #TransitionClassifierTransition classifier for command TransitionClassifier
IsForSubprocess #BooleanIf true means that the command was recieved from a subprocess
Identities #IEnumerable<String>List of user ids which can execute the command
CommandName #StringSystem name of the command
LocalizedName #StringLocalized name of the command
Methods
public object GetParameter(string name) #Get the parameter value
Parameters
Name
Type
Description
nameStringParameter name
Returns
Type
Description
ObjectParameter value
public void SetParameter(string name, object value, bool persist = false) #Set parameter value
Parameters
Name
Type
Description
nameStringParameter name
valueObjectParameter value
persistBooleanParameter persistence
public static WorkflowCommand Create(Guid processId, TransitionDefinition transitionDefinition, ProcessDefinition processDefinition, Func<string, Type, object> deserializer = null, CultureInfo culture = null) #Create a workflow command object
Parameters
Name
Type
Description
processIdGuidProcess id
deserializerFunc<Object>Function for deserialize InitialValue of Parameter from JSON
cultureCultureInfoCulture to localize command and command parameter names
Returns
Type
Description
WorkflowCommandWorkflowCommand object
public void AddIdentity(string identityId) #Add an identity in Identities collection
Parameters
Name
Type
Description
identityIdStringpublic bool Validate(out string errorMessage) #Validates a command
Parameters
Name
Type
Description
errorMessageStringErrors summary
Returns
Type
Description
Booleantrue if the command is valid
public void SetAllParametersToDefault() #Sets all value of parameters to their default values
public void SetParameterToDefault(string name) #Sets value of parameter with specific name to default value
Parameters
Name
Type
Description
nameStringName of parameter
Fields
public List<CommandParameter> Parameters #Parameters list of the command CommandParameter