Execution Slots

Execution slots are an advanced feature in kenaflow.

They can be used to execute workflows on different levels or "execution lanes" so that they work on distributed execution venues.

Workflows in kenaflow are executed in parallel. For this purpose sub processes are executed. Each sub process executes one workflow. All workflows are in a common queue. The maximum number of parallel executions is defined in the global configuration.

Please read this article for the details.

Workflows usually have a "TBE" time: Time Between Execution. This specifies how many seconds must elapse between two starts of the workflow before it is executed again. The specification of the "TBE" is a "minimum" specification. There is no guarantee that the workflow will restart after this time, since other workflows may be scheduled in the queue beforehand.

If it is now necessary for certain workflows to have a highly probable execution lane in the specified time, then execution slots can be used.

An analogy: Imagine a 5-lane highway. Each highway lane is a kenaflow execution lane. Slow workflows can prevent the fast ones from getting past them when the slow ones are allowed to occupy all lanes. Execution Slots can be used to specify that certain workflows are to be defined for certain lanes. Slot "0" (zero) accepts all non-configured workflows.

Any slots can be defined via the global configuration. This is configured in the "slots" setting in the "Main Mode" section. A list of slots is created here by specifying how many execution venues are provided per slot.

For example, if you have this settings in global configuration:

    <entry key="parallelWFExecutors" type="System.Int32" default="10"></entry>
    <entry key="slots" type="System.String" comment="semicolon separated list of integer values" default="">2;3</entry>

...than you have configured 10 execution lanes ("parallelWFExecutors"). And you have configured 3 slots: Slot #1 with 2 execution laness, Slot #2 with 3 execution lanes - and Slot #0 (default slot) with the rest of 4 execution lanes (10 - 2 - 3 = 7).

In the workflow configuration (missing) you can specify on which slot the workflow should run. All workflows that are configured for a certain slot will share all execution lanes that are assigned to the slot.

Discussion