State Task Sorting
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.
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.
Finally, the list of states is mapped to a list of stateTasks by mapping each state to all stateTasks that begin in that state.
Because of the nature of this implementation, the following effects may occur:
- In case of cyclic workflows, instances may not reach their final end state in 1 sequence
- Branching end states are not taken into account
|201712||3.2.0||Implemented sorting of stateTasks before processing|
|201803||126.96.36.199||Fixed issue with single-state workflows|