Class ConditionDefinition
Represent a transition's condition in a process scheme
Inheritance
↳ object
↳ ConditionDefinition
Inherited Members
Equals(object)
Equals(object, object)
GetHashCode()
GetType()
ReferenceEquals(object, object)
ToString()
Namespace: OptimaJet.Workflow.Core.Model
Assembly: OptimaJet.Workflow.Core.dll
Syntaxpublic sealed class ConditionDefinition
Properties
Type
Type of the condition ConditionType
Declaration[JsonConverter(typeof(StringEnumConverter))]
public ConditionType Type { get; set; }
Type | Description |
---|---|
ConditionType |
Action
Reference on the action if condition type is action ConditionType.Action
Declarationpublic ActionDefinitionReference Action { get; set; }
Type | Description |
---|---|
ActionDefinitionReference |
Expression
Expression code (lambda) if condition type is expression ConditionType.Expression
Declarationpublic string Expression { get; set; }
Type | Description |
---|---|
string |
ResultOnPreExecution
In pre-execution mode if not null the result of the condition will be overriden by the value
Declarationpublic bool? ResultOnPreExecution { get; set; }
Type | Description |
---|---|
bool? |
ConditionInversion
If true invert condition result if condition type is action ConditionType.Action
Declarationpublic bool ConditionInversion { get; set; }
Type | Description |
---|---|
bool |
Always
Create the instance of ConditionDefinition object with always type ConditionType.Always
Declarationpublic static ConditionDefinition Always { get; }
Type | Description |
---|---|
ConditionDefinition |
Otherwise
Create the instance of ConditionDefinition object with otherwise type ConditionType.Otherwise
Declarationpublic static ConditionDefinition Otherwise { get; }
Type | Description |
---|---|
ConditionDefinition |
Methods
Clone()
Declarationpublic ConditionDefinition Clone()
Type | Description |
---|---|
ConditionDefinition |
CreateAlwaysCondition()
Declarationpublic static ConditionDefinition CreateAlwaysCondition()
Type | Description |
---|---|
ConditionDefinition |
CreateOtherwiseCondition()
Declarationpublic static ConditionDefinition CreateOtherwiseCondition()
Type | Description |
---|---|
ConditionDefinition |
CreateActionCondition(ActionDefinitionReference, bool, bool?)
Declarationpublic static ConditionDefinition CreateActionCondition(ActionDefinitionReference action, bool conditionInversion, bool? resultOnPreExecution)
Type | Name | Description |
---|---|---|
ActionDefinitionReference | action | |
bool | conditionInversion | |
bool? | resultOnPreExecution |
Type | Description |
---|---|
ConditionDefinition |
CreateExpressionCondition(string, bool, bool?)
Declarationpublic static ConditionDefinition CreateExpressionCondition(string expression, bool conditionInversion, bool? resultOnPreExecution)
Type | Name | Description |
---|---|---|
string | expression | |
bool | conditionInversion | |
bool? | resultOnPreExecution |
Type | Description |
---|---|
ConditionDefinition |
Create(string, string)
Create ConditionDefinition object
Declaration[Obsolete("Use factory methods Create... to create conditions. ")]
public static ConditionDefinition Create(string type, string resultOnPreExecution)
Type | Name | Description |
---|---|---|
string | type | Type of the condition <xref href="OptimaJet.Workflow.Core.Model.ConditionType" data-throw-if-not-resolved="false"></xref> |
string | resultOnPreExecution | In pre-execution mode if not null the result of the condition will be overriden by the value |
Type | Description |
---|---|
ConditionDefinition | ConditionDefinition object |
Create(string, ActionDefinitionReference, string, string)
Create ConditionDefinition object
Declaration[Obsolete("Use factory methods Create... to create conditions. ")]
public static ConditionDefinition Create(string type, ActionDefinitionReference action, string conditionInversion, string resultOnPreExecution)
Type | Name | Description |
---|---|---|
string | type | Type of the condition <xref href="OptimaJet.Workflow.Core.Model.ConditionType" data-throw-if-not-resolved="false"></xref> |
ActionDefinitionReference | action | Referensce on the action if condition type is action <xref href="OptimaJet.Workflow.Core.Model.ConditionType.Action" data-throw-if-not-resolved="false"></xref> |
string | conditionInversion | If true invert condition result if condition type is action <xref href="OptimaJet.Workflow.Core.Model.ConditionType.Action" data-throw-if-not-resolved="false"></xref> |
string | resultOnPreExecution | In pre-execution mode if not null the result of the condition will be overriden by the value |
Type | Description |
---|---|
ConditionDefinition | ConditionDefinition object |