Assembly: OptimaJet.Workflow.Core

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.

public class CommandDefinition : BaseDefinition

Type Hierarchy

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
name
String
The command name.

Returns

Type
Description
CommandDefinition
The 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
parameterDefinitionReference
ParameterDefinitionReference
The existing command input whose name, required flag, default value, and comment are copied.
parameter
ParameterDefinition
The 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
CommandDefinition
A 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
parameters
List<ParameterDefinition>
The scheme-level ParameterDefinition instances used to remap the copied command input parameters.

Returns

Type
Description
CommandDefinition
A new CommandDefinition whose CommandDefinition.InputParameters refer to matching definitions from parameters.

Exceptions

Type
Description
InvalidOperationException
No ParameterDefinition in parameters has the same name as a parameter definition referenced by this command.