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
Syntaxpublic sealed class WorkflowCommand
Properties
ProcessId
Process id for which command is valid
Declarationpublic Guid ProcessId { get; set; }
Type | Description |
---|---|
Guid |
ValidForActivityName
Activity name for which command is valid
Declarationpublic string ValidForActivityName { get; set; }
Type | Description |
---|---|
string |
ValidForStateName
Activity name for which command is valid
Declarationpublic string ValidForStateName { get; set; }
Type | Description |
---|---|
string |
Classifier
Transition classifier for command TransitionClassifier
Declarationpublic TransitionClassifier Classifier { get; set; }
Type | Description |
---|---|
TransitionClassifier |
IsForSubprocess
If true means that the command was recieved from a subprocess
Declarationpublic bool IsForSubprocess { get; set; }
Type | Description |
---|---|
bool |
Identities
List of user ids which can execute the command
Declarationpublic IEnumerable<string> Identities { get; }
Type | Description |
---|---|
IEnumerable<string> |
CommandName
System name of the command
Declarationpublic string CommandName { get; set; }
Type | Description |
---|---|
string |
LocalizedName
Localized name of the command
Declarationpublic string LocalizedName { get; set; }
Type | Description |
---|---|
string |
Methods
GetParameter(string)
Get the parameter value
Declarationpublic object GetParameter(string name)
Type | Name | Description |
---|---|---|
string | name | Parameter name |
Type | Description |
---|---|
object | Parameter value |
SetParameter(string, object, bool)
Set parameter value
Declarationpublic void SetParameter(string name, object value, bool persist = false)
Type | Name | Description |
---|---|---|
string | name | Parameter name |
object | value | Parameter value |
bool | persist | Parameter persistence |
Create(Guid, TransitionDefinition, ProcessDefinition, Func<string, Type, object>, CultureInfo)
Create a workflow command object
Declarationpublic static WorkflowCommand Create(Guid processId, TransitionDefinition transitionDefinition, ProcessDefinition processDefinition, Func<string, Type, object> deserializer = null, CultureInfo culture = null)
Type | Name | Description |
---|---|---|
Guid | processId | Process id |
TransitionDefinition | transitionDefinition | Command transition <xref href="OptimaJet.Workflow.Core.Model.TransitionDefinition" data-throw-if-not-resolved="false"></xref> |
ProcessDefinition | processDefinition | <xref href="OptimaJet.Workflow.Core.Model.ProcessDefinition" data-throw-if-not-resolved="false"></xref> object which represent parsed workflow scheme |
Func<string, Type, object> | deserializer | Function for deserialize InitialValue of Parameter from JSON |
CultureInfo | culture | Culture to localize command and command parameter names |
Type | Description |
---|---|
WorkflowCommand | <xref href="OptimaJet.Workflow.Core.Runtime.WorkflowCommand" data-throw-if-not-resolved="false"></xref> object |
AddIdentity(string)
Add an identity in Identities collection
Declarationpublic void AddIdentity(string identityId)
Type | Name | Description |
---|---|---|
string | identityId |
Validate(out string)
Validates a command
Declarationpublic bool Validate(out string errorMessage)
Type | Name | Description |
---|---|---|
string | errorMessage | Errors summary |
Type | Description |
---|---|
bool | true if the command is valid |
SetAllParametersToDefault()
Sets all value of parameters to their default values
Declarationpublic void SetAllParametersToDefault()
SetParameterToDefault(string)
Sets value of parameter with specific name to default value
Declarationpublic void SetParameterToDefault(string name)
Type | Name | Description |
---|---|---|
string | name | Name of parameter |
Fields
Parameters
Parameters list of the command CommandParameter
Declarationpublic List<CommandParameter> Parameters
Type | Description |
---|---|
List<CommandParameter> |