Skip to main content

Introducing Formengine - The New Formbuilder, try for FREE formengine.io.

Class WorkflowCommand

Represents a workflow command for use in an application

Inheritance

↳ object

    ↳ WorkflowCommand

Inherited Members

Equals(object)

Equals(object, object)

GetHashCode()

GetType()

ReferenceEquals(object, object)

ToString()

Namespace: OptimaJet.Workflow.Core.Runtime

Assembly: OptimaJet.Workflow.Core.dll

Syntax
public sealed class WorkflowCommand

Properties

ProcessId

Process id for which command is valid

Declaration
public Guid ProcessId { get; set; }
Property value
TypeDescription
Guid

ValidForActivityName

Activity name for which command is valid

Declaration
public string ValidForActivityName { get; set; }
Property value
TypeDescription
string

ValidForStateName

Activity name for which command is valid

Declaration
public string ValidForStateName { get; set; }
Property value
TypeDescription
string

Classifier

Transition classifier for command TransitionClassifier

Declaration
public TransitionClassifier Classifier { get; set; }
Property value
TypeDescription
TransitionClassifier

IsForSubprocess

If true means that the command was recieved from a subprocess

Declaration
public bool IsForSubprocess { get; set; }
Property value
TypeDescription
bool

Identities

List of user ids which can execute the command

Declaration
public IEnumerable<string> Identities { get; }
Property value
TypeDescription
IEnumerable<string>

CommandName

System name of the command

Declaration
public string CommandName { get; set; }
Property value
TypeDescription
string

LocalizedName

Localized name of the command

Declaration
public string LocalizedName { get; set; }
Property value
TypeDescription
string

Methods

GetParameter(string)

Get the parameter value

Declaration
public object GetParameter(string name)
Parameters
TypeNameDescription
stringnameParameter name
Returns
TypeDescription
objectParameter value

SetParameter(string, object, bool)

Set parameter value

Declaration
public void SetParameter(string name, object value, bool persist = false)
Parameters
TypeNameDescription
stringnameParameter name
objectvalueParameter value
boolpersistParameter persistence

Create(Guid, TransitionDefinition, ProcessDefinition, Func<string, Type, object>, CultureInfo)

Create a workflow command object

Declaration
public static WorkflowCommand Create(Guid processId, TransitionDefinition transitionDefinition, ProcessDefinition processDefinition, Func<string, Type, object> deserializer = null, CultureInfo culture = null)
Parameters
TypeNameDescription
GuidprocessIdProcess id
TransitionDefinitiontransitionDefinitionCommand transition <xref href="OptimaJet.Workflow.Core.Model.TransitionDefinition" data-throw-if-not-resolved="false"></xref>
ProcessDefinitionprocessDefinition<xref href="OptimaJet.Workflow.Core.Model.ProcessDefinition" data-throw-if-not-resolved="false"></xref> object which represent parsed workflow scheme
Func<string, Type, object>deserializerFunction for deserialize InitialValue of Parameter from JSON
CultureInfocultureCulture to localize command and command parameter names
Returns
TypeDescription
WorkflowCommand<xref href="OptimaJet.Workflow.Core.Runtime.WorkflowCommand" data-throw-if-not-resolved="false"></xref> object

AddIdentity(string)

Add an identity in Identities collection

Declaration
public void AddIdentity(string identityId)
Parameters
TypeNameDescription
stringidentityId

Validate(out string)

Validates a command

Declaration
public bool Validate(out string errorMessage)
Parameters
TypeNameDescription
stringerrorMessageErrors summary
Returns
TypeDescription
booltrue if the command is valid

SetAllParametersToDefault()

Sets all value of parameters to their default values

Declaration
public void SetAllParametersToDefault()

SetParameterToDefault(string)

Sets value of parameter with specific name to default value

Declaration
public void SetParameterToDefault(string name)
Parameters
TypeNameDescription
stringnameName of parameter

Fields

Parameters

Parameters list of the command CommandParameter

Declaration
public List<CommandParameter> Parameters
Returns
TypeDescription
List<CommandParameter>

Extension Methods