Skip to main content

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

Syntax
public sealed class ConditionDefinition

Properties

Type

Type of the condition ConditionType

Declaration
[JsonConverter(typeof(StringEnumConverter))]
public ConditionType Type { get; set; }
Property value
TypeDescription
ConditionType

Action

Reference on the action if condition type is action ConditionType.Action

Declaration
public ActionDefinitionReference Action { get; set; }
Property value
TypeDescription
ActionDefinitionReference

Expression

Expression code (lambda) if condition type is expression ConditionType.Expression

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

ResultOnPreExecution

In pre-execution mode if not null the result of the condition will be overriden by the value

Declaration
public bool? ResultOnPreExecution { get; set; }
Property value
TypeDescription
bool?

ConditionInversion

If true invert condition result if condition type is action ConditionType.Action

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

Always

Create the instance of ConditionDefinition object with always type ConditionType.Always

Declaration
public static ConditionDefinition Always { get; }
Property value
TypeDescription
ConditionDefinition

Otherwise

Create the instance of ConditionDefinition object with otherwise type ConditionType.Otherwise

Declaration
public static ConditionDefinition Otherwise { get; }
Property value
TypeDescription
ConditionDefinition

Methods

Clone()

Declaration
public ConditionDefinition Clone()
Returns
TypeDescription
ConditionDefinition

CreateAlwaysCondition()

Declaration
public static ConditionDefinition CreateAlwaysCondition()
Returns
TypeDescription
ConditionDefinition

CreateOtherwiseCondition()

Declaration
public static ConditionDefinition CreateOtherwiseCondition()
Returns
TypeDescription
ConditionDefinition

CreateActionCondition(ActionDefinitionReference, bool, bool?)

Declaration
public static ConditionDefinition CreateActionCondition(ActionDefinitionReference action, bool conditionInversion, bool? resultOnPreExecution)
Parameters
TypeNameDescription
ActionDefinitionReferenceaction
boolconditionInversion
bool?resultOnPreExecution
Returns
TypeDescription
ConditionDefinition

CreateExpressionCondition(string, bool, bool?)

Declaration
public static ConditionDefinition CreateExpressionCondition(string expression, bool conditionInversion, bool? resultOnPreExecution)
Parameters
TypeNameDescription
stringexpression
boolconditionInversion
bool?resultOnPreExecution
Returns
TypeDescription
ConditionDefinition

Create(string, string)

Create ConditionDefinition object

Declaration
[Obsolete("Use factory methods Create... to create conditions. ")]
public static ConditionDefinition Create(string type, string resultOnPreExecution)
Parameters
TypeNameDescription
stringtypeType of the condition <xref href="OptimaJet.Workflow.Core.Model.ConditionType" data-throw-if-not-resolved="false"></xref>
stringresultOnPreExecutionIn pre-execution mode if not null the result of the condition will be overriden by the value
Returns
TypeDescription
ConditionDefinitionConditionDefinition 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)
Parameters
TypeNameDescription
stringtypeType of the condition <xref href="OptimaJet.Workflow.Core.Model.ConditionType" data-throw-if-not-resolved="false"></xref>
ActionDefinitionReferenceactionReferensce on the action if condition type is action <xref href="OptimaJet.Workflow.Core.Model.ConditionType.Action" data-throw-if-not-resolved="false"></xref>
stringconditionInversionIf true invert condition result if condition type is action <xref href="OptimaJet.Workflow.Core.Model.ConditionType.Action" data-throw-if-not-resolved="false"></xref>
stringresultOnPreExecutionIn pre-execution mode if not null the result of the condition will be overriden by the value
Returns
TypeDescription
ConditionDefinitionConditionDefinition object

Extension Methods