Class CommandDefinition
OptimaJet.Workflow.Core.Model.CommandDefinition
Defines a named command trigger in a ProcessDefinition. Executing the command makes Workflow Engine evaluate matching transitions from the current activity, and CommandDefinition.InputParameters defines the additional data that the caller can supply.
Namespace: OptimaJet.Workflow.Core.Model
public class CommandDefinition : BaseDefinitionType Hierarchy
- BaseDefinition
- CommandDefinition Current type
Properties
public List<ParameterDefinitionReference> InputParameters { get; set; } #Gets or sets the command input parameters. Each ParameterDefinitionReference maps a value supplied by an application to a scheme-level ParameterDefinition.
public string Comment { get; set; } #Gets or sets the descriptive comment stored with the command in the process scheme.
Methods
public static CommandDefinition Create(string name) #Creates a command definition named
name with an empty CommandDefinition.InputParameters collection.Parameters
Name
Type
Description
nameStringThe command name.
Returns
Type
Description
CommandDefinitionThe newly created CommandDefinition.
public void AddParameterRef(ParameterDefinitionReference parameterDefinitionReference, ParameterDefinition parameter) #Adds a command input that copies its input settings from
parameterDefinitionReference and stores the submitted value in parameter.Parameters
Name
Type
Description
parameterDefinitionReferenceParameterDefinitionReferenceThe existing command input whose name, required flag, default value, and comment are copied.
parameterParameterDefinitionThe scheme parameter that receives the submitted command input value.
public CommandDefinition Clone() #Creates a copy of this command definition, including copies of CommandDefinition.InputParameters, each referenced ParameterDefinition, and BaseDefinition.DesignerSettings.
Returns
Type
Description
CommandDefinitionA new CommandDefinition with a new CommandDefinition.InputParameters collection and cloned command input parameter mappings.
public CommandDefinition Clone(List<ParameterDefinition> parameters) #Creates a copy of this command definition and sets each copied ParameterDefinitionReference.Parameter to the first element of
parameters whose parameter name matches the originally referenced parameter name using StringComparison.Ordinal.Parameters
Name
Type
Description
parametersList<ParameterDefinition>The scheme-level ParameterDefinition instances used to remap the copied command input parameters.
Returns
Type
Description
CommandDefinitionA new CommandDefinition whose CommandDefinition.InputParameters refer to matching definitions from
parameters.Exceptions
Type
Description
InvalidOperationExceptionNo ParameterDefinition in
parameters has the same name as a parameter definition referenced by this command.