🔷Using gateway logic

Using logic gateway can be useful o decide which acion should be taken depending on a logical expression

Gateway properties

When you select inner type "Gateway" the following configurations are displayed.

Inner gateway

As the image above shows, gateway have the following properties:

  • Left side expression input: left side of expression variable, must be some existing variable from within workflow.

  • Comparison: logic condition for comparison

    • ==

    • !=

    • >

    • >=

    • <

    • <=

    • is

    • is not

    • in

    • not in

  • Right side expression type input:

    • Fixed value: if this option selected a fixed value must be inserted.

    • Existing variable: existing variable from within workflow for comparison.

We started of by editing our previously created workflow so that the second block will be a gateway operator with the following configuration. To do that, we need to click on block number two and select the inner type "Gateway".

Inner gateway filled

This config tells the workflow to check if the output from block 1 (add-objects) is equals to 3.

Selected gateway

After that we need to continue our workflow. To do so, we click on the "+" node of our graph. It will be displayed the inner block options. We then selected the atomic block "subtract-object" to be executed if the gateway condition is True.

Block if true

Note that we selected the switch "End if/else" to tell the workflow to end path after this block.

We then selected next block and select the atomic block "set-value" to be executed if the condition is false.

Else block

To finish our workflow, we added a block that will be executed on either situation, independent from logical gateway result. We selected the atomic block "sleep" to be executed.

Sleep block

Our workflow then will look like the below image.

Final workflow

And the workflow configuration will be like this:

Final workflow config

We then saved our workflow and test it to see if it was correcly configured.

Workflow output logical gateway is true
Workflow output logical gateway is false

Last updated