Condition (IF) transfer object
The "Condition (IF)" transfer object allows you to execute parts of a flow only if a condition is met. If the condition is true, the THEN branch executes; if it is false, the optional ELSE branch executes. Both branches are sub- () that belong exclusively to this Condition transfer object.
Create the object within the flow as described and open the editor by double-clicking it.
Properties
The editor is organized into the Inputs, Outputs, and Variables tabs.
"Inputs" tab
| Property | Description |
|---|---|
| Inputs | List of input values (name + data type). Each input appears as a wireable item on the object, is passed to the branch, and can be used as a variable in the conditional expression. The name must be a valid variable name; names of calculator functions (e.g., MAX, MIN) are rejected. |
| Condition | The expression that determines the outcome via THEN or ELSE. The syntax of the calculator transfer object applies; use the ƒ button to insert functions. The result must be a Boolean value; a numeric result other than 0 is considered true. |
| Check | Validates the expression (syntax, variables used, result type) with example values of the declared types and displays an example result. In a template, any template variables contained within it are replaced with their values (instance value, or default value otherwise) before the check; the message specifies the expression that was checked. Variables without a value can only be checked using the instance’s values—the editor then displays a note instead of an error. |
Use Insert Input to add declared inputs to the condition with a single click.
Examples of conditions:
Temperatur > 80
Status == "OK" && Stueckzahl >= 100
"Outputs" tab
| Property | Description |
|---|---|
| Outputs | List of return values (name + data type). Each output appears as an item on the object and receives its value from the scope return of the executed branch. |
| Default value | Optional value per output. It takes effect if the executed branch does not return a value—or if the condition is false and no ELSE branch exists. |
"Variables" tab
Declaration of the scope variables for both branches (name, data type, default value) as well as their assignment: static value or hard-wired input (an empty static value generates a hard-wired item “Condition Variable Inputs”).
The variables are synchronized across both branches. Even a variable created directly in the branch designer is automatically copied to the condition transfer object and the other branch.
Branches and Other Properties
The branches are managed directly at the object’s diagram node: The action bar displays Create THEN or Open THEN (and similarly for ELSE). Creating a subflow creates it and immediately links it to the object; opening a subflow switches to a new tab, while the current tab remains open.
| Property | Description |
|---|---|
| THEN Branch | Required. Created and opened via the action bar on the node. |
| ELSE Branch | Optional. Without an ELSE branch, no branch is executed if the condition is false, and the default values of the outputs are applied. |
Repair Branches
If the editor detects problems with the branches (e.g., after external changes to the project files), it lists them in a note below the tabs and offers two actions: Repair Branches restores metadata, missing scope bridges, and variables of the referenced branches; Delete Unreferenced Branches removes branches that belong to this transfer object but are no longer referenced as THEN or ELSE branches (visible only if such branches exist).
Runtime Behavior
| Situation | Behavior |
|---|---|
| Condition true | The THEN branch executes; its return values are available at the outputs. The ELSE branch is marked as “Skipped.” |
| Condition false, ELSE present | ELSE branch executes. |
| Condition false, no ELSE | No branch executes; the default values of the outputs are applied; the transfer is successful. |
| error The flow transfer fails; the status details specify the branch and the point where it failed. | |
| Timeout | If the branch runs longer than the time limit of 30 seconds, the transfer fails and the branch is aborted. |
In the object’s transfer details, you can see the condition result, the executed and skipped branches, the call destination, and the duration for each run.
Copying and Deleting
- If the condition transfer object is copied and pasted individually, the copy will have no branches—it never inherits the branches from the original.
- If the entire flow is copied, exported, or imported, the branches are moved along with it and are automatically relinked.
- If the flow is deleted, its branches are also deleted.