State Task Sorting

Before a workflow is processed, all stateTasks are sorted in such a way that tasks can be executed in sequence.

Step 1: Removing cycles

Workflows cannot be sorted if they contain cycles. To solve this problem, some stateTasks are removed to make the workflows acyclic. This is done by walking through the workflow graph and removing any state transitions (begin to end state or begin to failed state) that end in states we have already seen.

Step 2: Sorting the states

The workflow graph is then sorted in a list of states in a way that for each two states that are connected by a state transition, the begin state occurs before the end or failed state.

Step 3: States to stateTasks

Finally, the list of states is mapped to a list of stateTasks by mapping each state to all stateTasks that begin in that state.

Consequences of this implementation

Because of the nature of this implementation, the following effects may occur:

  1. In case of cyclic workflows, instances may not reach their final end state in 1 sequence
  2. Branching end states are not taken into account


Release Expander version Change
201712 3.2.0 Implemented sorting of stateTasks before processing
201803 Fixed issue with single-state workflows

results matching ""

    No results matching ""