Gateways

The Gateways implemented in our Workflowengine are the following:

  • Exclusive Gateways
  • Parallel Gateways
  • Complex Gateways
  • Inclusive Gateway

Those Gateways have different implementations and strategies.

Name your Gateways

Parallel and Inclusive Gateways need the Name to be set correctly. This means, the diverging Gateway needs a unique name followed by start The converging Gateway needs the same unique name followed by stop

Exclusive Gateway

Exclusive Gateway

The Exclusive Gateway chooses one route, it will follow. For this it will compare the “Value” on the Route with “condition”.

To set the “condition” you just set the variable “condition”, either before the gateway or in the gateway.

[[ set "condition" $myvalue ]]

The gateway will then choose the route with an “equal” value. Make sure, your type match.

If $myvalue is a number also set a plain number onto the route. If you have a string in $myvalue quote the number on the route.

Example:

Exclusive Gateway Example

Inclusive Gateway

Inclusive Gateway

The Inclusive Gateway runs all the routes, that match. For this to work, you have to write the expression onto the route.

As an example a route names could be

[[ eq (get "condition") 2 ]]
[[ lt (get "condition") 10 ]]
[[ gt (get "condition") 0 ]]

In this case, all the 3 Routes would be traversed and run, if the condition would be 1

Example:

Inclusive Gateway Example

Complex Gateway

Complex Gateway

The Complex Gateway uses the same Syntax as the Inclusive Gateway. The difference between Inclusive and Complex Gateways is, that on a Complex Gateway only the ONE of the route is traversed. Even if more than one condition rules matches.

If none matches, the Default route will be choosen.

Parallel Gateway

Parallel Gateway

Parallel Gateway will run all routes. It runs one after another. For that to make it work, it has to know, where the Gateway ends.

You need to set a unique name with start and stop.

Parallel Gateway Example