Routing

Overview

The Routing component is used to create condition branches to determine the execution logic of subsequent nodes. You need to configure the conditions of each branch on the connection line between the Routing node and its adjacent nodes.

Configuration

Table 1 Routing

Parameter

Description

Condition Type

There are two condition types: When and Otherwise.

  • When: If the current condition is met, the step on the branch is executed when the data transferred to the Routing node meets the specified expression.
  • Otherwise: If other conditions are not met, the step on the branch is executed when the data transferred to the Routing node does not meet the conditions of all other branches.

Expression Type

The value can be JSONPath, XPath, or Simple Expression. Select an expression type based on the data structure.

For details about expression types, see Overview.

Expression

Expression of the current condition branch, for example:

  • Expression of the JSONPath type: [?($[0].name=='test_user')]
  • Expression for the XPath type: /userinfo/user[1]/id/text() = 'test_user'
  • Expression of the simple type: ${property.name} == 'test_user'

For details about the operators supported by Simple Expression, see Simple Expression Operators.

  • On a Routing node, if there are multiple expressions of the same type that meet the When condition, the step on the first created branch is executed.
  • On a Routing node, only one branch of the Otherwise condition type is allowed.