Skip to main content

Class TransitionDefinition

Represent a transition in a process scheme

Inheritance

↳ object

    ↳ BaseDefinition

        TransitionDefinition

Inherited Members

BaseDefinition.Name

BaseDefinition.DesignerSettings

Equals(object)

Equals(object, object)

GetHashCode()

GetType()

MemberwiseClone()

ReferenceEquals(object, object)

ToString()

Namespace: OptimaJet.Workflow.Core.Model

Assembly: OptimaJet.Workflow.Core.dll

Syntax
public class TransitionDefinition : BaseDefinition

Properties

InlinedFinalActivityName

Final activity name in inlined scheme, may not be filled, then any final activity from inlined scheme will be taken

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

OriginalName

If object was inlined, you can get its original name from this property

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

OriginalSchemeCode

The code of the scheme to which the inlined object originally belonged.

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

LastTimeInlineName

The name of the inline activity instead of which the object was inlined.last time

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

FirstTimeInlineName

The name of the inline activity instead of which the object was inlined first time.

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

UserComment

Custom comment

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

WasInlined

Return true if the object was inlined.

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

From

Source activity

Declaration
public ActivityDefinition From { get; set; }
Property value
TypeDescription
ActivityDefinition

To

Destination activity

Declaration
public ActivityDefinition To { get; set; }
Property value
TypeDescription
ActivityDefinition

Classifier

Classifier of the direction of the transition

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

Trigger

Transition's trigger

Declaration
public TriggerDefinition Trigger { get; set; }
Property value
TypeDescription
TriggerDefinition

Conditions

List of conditions which are checked to execute transition

Declaration
public List<ConditionDefinition> Conditions { get; set; }
Property value
TypeDescription
List<ConditionDefinition>

Restrictions

List of actors which are determine a user which can execute transition

Declaration
public List<RestrictionDefinition> Restrictions { get; set; }
Property value
TypeDescription
List<RestrictionDefinition>

AllowConcatenationType

Type of concatenation for restrictions with the type equal "Allow" RestrictionType.Allow RestrictionDefinition.Type

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

RestrictConcatenationType

Type of concatenation for restrictions with the type equal "Restrict" RestrictionType.Restrict RestrictionDefinition.Type

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

ConditionsConcatenationType

Type of concatenation for conditions

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

Annotations

A List of Annotation attached to this transition.

Declaration
public List<Annotation> Annotations { get; set; }
Property value
TypeDescription
List<Annotation>

HasExpressions

Returns true if the transition has expressions

Declaration
[JsonIgnore]
public bool HasExpressions { get; }
Property value
TypeDescription
bool

IsFork

Returns true if Transition initialized or finalized a fork (split, parallel branch). Fork transition is the initial or final transition of a subprocess

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

MergeViaSetState

Returns true if after a subprocess will be merged with a parent process new state of a parent process will be set forcibly

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

DisableParentStateControl

Applied if transition is fork. False - mean that subprocess will be dropped if parent process turned up in a state where subprocess can not exist. True - mean that subprocess control is responsibility of a developer.

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

SubprocessStartupType

Defines how the subprocess starts

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

SubprocessInOutDefinition

Defines if the transition is start or final

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

SubprocessName

Subprocess custom name

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

SubprocessId

Subprocess identifier (must be GUID) or expression to get the subprocess identifier from parameters

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

SubprocessStartupParameterCopyStrategy

Determines how parameters from the parent process are passed to the subprocess at startup

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

SubprocessFinalizeParameterMergeStrategy

Determines how parameters from a subprocess are passed to the parent process when final merge

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

SubprocessSpecifiedParameters

A list of parameters that are either passed or not passed to or from a subprocess (see SubprocessStartupParameterCopyStrategy or SubprocessFinalizeParameterMergeStrategy

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

SubprocessSpecifiedParametersList

Declaration
public List<string> SubprocessSpecifiedParametersList { get; }
Property value
TypeDescription
List<string>

IsAlwaysTransition

Returns true if condition type of the transition is equal "Always" ConditionType.Always

Declaration
public bool IsAlwaysTransition { get; }
Property value
TypeDescription
bool

IsOtherwiseTransition

Returns true if condition type of the transition is equal "Otherwise" ConditionType.Otherwise

Declaration
public bool IsOtherwiseTransition { get; }
Property value
TypeDescription
bool

IsConditionTransition

Returns true if condition type of the transition is equal "Action" ConditionType.Action

Declaration
public bool IsConditionTransition { get; }
Property value
TypeDescription
bool

ForkType

Returns type of fork transition TransitionForkType

Declaration
[JsonConverter(typeof(StringEnumConverter))]
public TransitionForkType ForkType { get; }
Property value
TypeDescription
TransitionForkType

Methods

Create(string, TransitionClassifier, ConcatenationType, ConcatenationType, ConcatenationType, ActivityDefinition, ActivityDefinition, TriggerDefinition, List<ConditionDefinition>)

Create TransitionDefinition object

Declaration
public static TransitionDefinition Create(string name, TransitionClassifier classifier, ConcatenationType allowRestrictionsConcatenationType, ConcatenationType denyRestrictionsConcatenationType, ConcatenationType conditionsConcatenationType, ActivityDefinition from, ActivityDefinition to, TriggerDefinition trigger, List<ConditionDefinition> conditions)
Parameters
TypeNameDescription
stringnameName of the transition
TransitionClassifierclassifier
ConcatenationTypeallowRestrictionsConcatenationTypeType of concatenation for restrictions with the type equal "Allow" <xref href="OptimaJet.Workflow.Core.Model.RestrictionType.Allow" data-throw-if-not-resolved="false"></xref> <xref href="OptimaJet.Workflow.Core.Model.RestrictionDefinition.Type" data-throw-if-not-resolved="false"></xref>
ConcatenationTypedenyRestrictionsConcatenationTypeType of concatenation for restrictions with the type equal "Restrict" <xref href="OptimaJet.Workflow.Core.Model.RestrictionType.Restrict" data-throw-if-not-resolved="false"></xref> <xref href="OptimaJet.Workflow.Core.Model.RestrictionDefinition.Type" data-throw-if-not-resolved="false"></xref>
ConcatenationTypeconditionsConcatenationTypeType of concatenation for conditions
ActivityDefinitionfromSource activity
ActivityDefinitiontoDestination activity
TriggerDefinitiontriggerTransition's trigger
List<ConditionDefinition>conditionsList of conditions which are checked to execute transition
Returns
TypeDescription
TransitionDefinitionTransitionDefinition object

SetSubprocessSettings(string, string, bool, bool, SubprocessInOutDefinition, SubprocessStartupType, SubprocessStartupParameterCopyStrategy, SubprocessFinalizeParameterMergeStrategy, string)

Sets subprocess specific parameters

Declaration
public TransitionDefinition SetSubprocessSettings(string subprocessName, string subprocessId, bool mergeViaSetState, bool disableParentStateControl, SubprocessInOutDefinition inOutDefinition, SubprocessStartupType startupType, SubprocessStartupParameterCopyStrategy startupParameterCopyStrategy, SubprocessFinalizeParameterMergeStrategy finalizeParameterMergeStrategy, string subprocessSpecifiedParameters)
Parameters
TypeNameDescription
stringsubprocessNameSubprocess name or expression in order to calculate subprocess name
stringsubprocessIdSubprocess identifier (must be GUID) or expression to get the subprocess identifier from parameters
boolmergeViaSetStateReturns true if after a subprocess will be merged with a parent process new state of a parent process will be set forcibly
booldisableParentStateControlApplied if transition is fork. False - mean that subprocess will be dropped if parent process turned up in a state where subprocess can not exist.
True - mean that subprocess control is responsibility of a developer
SubprocessInOutDefinitioninOutDefinitionDefines if the transition is start or final
SubprocessStartupTypestartupTypeDefines how the subprocess starts
SubprocessStartupParameterCopyStrategystartupParameterCopyStrategyDetermines how parameters from the parent process are passed to the subprocess at startup
SubprocessFinalizeParameterMergeStrategyfinalizeParameterMergeStrategyDetermines how parameters from a subprocess are passed to the parent process when final merge
stringsubprocessSpecifiedParametersA list of parameters that are either passed or not passed to or from a subprocess (see SubprocessStartupParameterCopyStrategy or SubprocessFinalizeParameterMergeStrategy
Returns
TypeDescription
TransitionDefinition

Create(ActivityDefinition, ActivityDefinition)

Create TransitionDefinition object with NotSpecified classifier, Always condition, Auto trigger

Declaration
public static TransitionDefinition Create(ActivityDefinition from, ActivityDefinition to)
Parameters
TypeNameDescription
ActivityDefinitionfromSource activity
ActivityDefinitiontoDestination activity
Returns
TypeDescription
TransitionDefinitionTransitionDefinition object

AddRestriction(RestrictionDefinition)

Add restriction to restrictions list

Declaration
public void AddRestriction(RestrictionDefinition restriction)
Parameters
TypeNameDescription
RestrictionDefinitionrestrictionRestrictionDefinition object

Clone()

Declaration
public TransitionDefinition Clone()
Returns
TypeDescription
TransitionDefinition

Clone(List<ActorDefinition>, List<CommandDefinition>, List<ActivityDefinition>, List<TimerDefinition>)

Clones TransitionDefinition object replacing references to the references to the specific objects

Declaration
public TransitionDefinition Clone(List<ActorDefinition> actorDefinitions, List<CommandDefinition> commandDefinitions, List<ActivityDefinition> activityDefinitions, List<TimerDefinition> timerDefinitions)
Parameters
TypeNameDescription
List<ActorDefinition>actorDefinitionsList of the actors to replace
List<CommandDefinition>commandDefinitionsList of the commands to replace
List<ActivityDefinition>activityDefinitionsList of the activities to replace
List<TimerDefinition>timerDefinitionsList of the timers to replace
Returns
TypeDescription
TransitionDefinitionCloned TransitionDefinition object

GetAnnotation<T>(string)

Get an annotation attached to this transition

Declaration
public T GetAnnotation<T>(string name)
Parameters
TypeNameDescription
stringnameAnnotation's name
Returns
TypeDescription
{T}Annotation value

GetAnnotation(string)

Get a JSON representation of annotation's value

Declaration
public string GetAnnotation(string name)
Parameters
TypeNameDescription
stringnameAnnotation's name
Returns
TypeDescription
stringJSON representation of annotation's value

Extension Methods