Skip to content

Deflow algorithm

Gurmit Teotia edited this page Oct 27, 2017 · 27 revisions

Scheduling of activities, timer or any other child element is powered by Dependency Flow (Deflow) algorithm. Deflow algorithm simplify the writing of complex workflow involving parallel execution branches and let you schedule elements when multiple parallel activities are finished executing.

Deflow algorithm work as described below:

  1. When a scheduling item is completed then select all of its children to schedule next
  2. When scheduling an item (activity or timer), ensure that all of its parent branch are inactive
  3. When jumping down the executing branch, then try to schedule the first joint item as described in step 2
  4. When an item can not be scheduled because scheduling condition is evaluated to false then try to schedule the first joint item as described in step 2

Above implementation of Deflow algorithm will work very well for many complex scenario, however you can customise any of above in your workflow.

Lets us look at some examples to understand how Deflow algorithm works:

Clone this wiki locally