Workflow Engine .NET

Assembly: OptimaJet.Workflow.Core

Class WorkflowCommand

OptimaJet.Workflow.Core.Runtime.WorkflowCommand

Represents a workflow command for use in an application

public sealed class WorkflowCommand

Inheritance

  • System.Object

Properties

Name
Type
ProcessId #
Guid
Process id for which command is valid
ValidForActivityName #
String
Activity name for which command is valid
ValidForStateName #
String
Activity name for which command is valid
Classifier #
TransitionClassifier
Transition classifier for command TransitionClassifier
IsForSubprocess #
Boolean
If true means that the command was recieved from a subprocess
Identities #
IEnumerable<String>
List of user ids which can execute the command
CommandName #
String
System name of the command
LocalizedName #
String
Localized name of the command

Methods

public object GetParameter(string name) #
Get the parameter value

Parameters

Name
Type
Description
name
String
Parameter name

Returns

Type
Description
Object
Parameter value
public void SetParameter(string name, object value, bool persist = false) #
Set parameter value

Parameters

Name
Type
Description
name
String
Parameter name
value
Object
Parameter value
persist
Boolean
Parameter 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
processId
Guid
Process id
transitionDefinition
TransitionDefinition
Command transition TransitionDefinition
processDefinition
ProcessDefinition
ProcessDefinition object which represent parsed workflow scheme
deserializer
Func<Object>
Function for deserialize InitialValue of Parameter from JSON
culture
CultureInfo
Culture to localize command and command parameter names

Returns

Type
Description
WorkflowCommand
public void AddIdentity(string identityId) #
Add an identity in Identities collection

Parameters

Name
Type
Description
identityId
String
public bool Validate(out string errorMessage) #
Validates a command

Parameters

Name
Type
Description
errorMessage
String
Errors summary

Returns

Type
Description
Boolean
true 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
name
String
Name of parameter

Fields

public List<CommandParameter> Parameters #
Parameters list of the command CommandParameter