How to Set Branching Conditions

In workflow branching, you can determine which path to take based on the Operator’s selection or the values of entered data. This article explains how to branch from a Human Task and how to specify conditional expressions (transition conditions) used in Split XOR Gateways and similar elements. These are basic branching features available from the Basic edition. (For how to choose between XOR / OR / AND gateways, see the separate article “Choosing Between XOR / OR / AND Gateways”. Split OR and Split AND Gateways are available in the Advanced edition and above.)


Branching from a Human Task

When you connect two or more outgoing arrows from a Human Task, you can configure branching on the step itself. On the properties screen, in the [Split] tab, you can choose one of the following two Branch Types:

  • Route to the destination selected by the user (displays as many task completion buttons as there are destinations): The token’s destination is determined by which button the Operator presses (e.g., “Approve” or “Send Back”).
  • Route to the first matching condition (only one task completion button): Conditional expressions are preconfigured for each path, and when the task is completed, the token advances to the path whose condition matches the input values.

For branching where a person makes a judgment and chooses the path, such as approval or rejection, the first method is the simplest. The configuration method for using conditional expressions is explained below.


Where to Configure Conditional Expressions

Conditional expressions (transition conditions) are configured on the following screens:

  • Split XOR Gateway: Properties screen
  • Human Task: [Split] tab on the properties screen

On either screen, clicking the pencil icon opens the conditional settings window. Here, you select the destination node to which the token advances when the conditions are met (if no conditions are met, the token proceeds to the Default Flow).

(Note: The Split OR Gateway, available in the Advanced edition and above, also uses the same procedure for configuring conditional expressions.)


Basics of Conditional Expressions

In a single transition condition, you specify one Data Item and choose a condition for its input value. For example, you select conditions such as “is equals to (the value on the right)” or “is greater than (the value on the right)”, along with the comparison value. The available condition types are determined by the data type (for details, see R2030: Types of Conditional Expressions at Branching).

As an example, in an expense approval flow, if the condition “total amount is greater than 100,000 yen” is met, the token flows to the manager’s “Approval” step; if not, the token flows to the General Affairs department via the Default Flow.

Two Ways to Specify Conditions

  • Select a Data Item and condition from the UI (this is the standard method): As described above, you simply select the Data Item, condition, and value on the screen. Use this method in most cases.
  • Write a SpEL (EL) expression: You can also write more complex conditions as expressions. However, this is an advanced feature for engineers and is not typically used (for details, see R2031: Expression Language that can be set as transition conditions at branching).

Default Flow

At the bottom of the transition conditions, there is always one “Default Flow” that cannot be deleted. The token advances to this destination only when none of the other configured conditions are met. This prevents the token from getting stuck due to insufficient input data or other reasons.

The Default Flow cannot be deleted, but its destination can be changed. Since it is defined as “when no other conditions are met,” no conditional expression needs to be configured for it.


Meeting All Conditions (AND)

You can create more complex conditions by adding multiple conditional expressions to a single transition condition. To add a conditional expression, click [+] at the bottom of the conditional settings dialog (opened by the pencil icon). In this case, the token advances to the specified destination only when all added expressions are satisfied.

Example: “Title is not empty” AND “Numeric Data Item is 1000 or greater.”


Meeting Any Condition (OR)

Unlike AND, you cannot specify OR within a single transition condition. To achieve OR, add multiple transition conditions that point to the same destination (click [+] at the bottom of the [Split] tab to add a transition condition row). The token advances when any one of them is satisfied.


Transition Conditions Are Evaluated from Top to Bottom

When there are multiple transition conditions, they are evaluated from top to bottom in the list, and the token advances to the destination of the first matching row (if none match, it goes to the Default Flow at the bottom). As in the OR example above, if the destinations are the same, the order does not matter.

The order affects the result when conditions with different destinations overlap. For example, if you set “total amount is 10,000 yen or more → Manager Approval” and “total amount is 100,000 yen or more → Executive Approval,” placing “10,000 yen or more” above means that even an application for 200,000 yen would match “10,000 yen or more” first and never reach Executive Approval. In this case, place “100,000 yen or more” above.


Flow Structure

After branching, the paths take one of the following forms:

  • Merge after branching: The diverged paths are brought back together into a single path using a XOR-Merge Gateway.
  • End without merging: The diverged paths each reach a separate End Event without merging.
  • Loop structure: A path loops back, and the same step is repeated.

See also

Choosing Between XOR / OR / AND Gateways

R2030: Types of Conditional Expressions at Branching

R2031: Expression Language that can be set as transition conditions at branching

Getting Started with Questetra App Design – Chapter 7: Changing Processing Based on Conditions

Discover more from Questetra Support

Subscribe now to keep reading and get access to the full archive.

Continue reading