Condition

Article • 02.08.2022 • 4 minute(s) to read

Condition

Conditions create branches in Processes by evaluating the configured conditions to determine what Outcome or Outcomes are selected.

The Condition Activity can have an arbitrary amount of Outcomes. The Outcomes need different names, since the names are used to identify them in the configuration of this Activity. If multiple Outcomes have the same name, they are treated as one Outcome in the configured conditions and the Process is paralleled.

The configured conditions select the matching Outcomes out of all Outcomes the Activity has. Should multiple Outcome with different names match, than only the first of these Outcomes is selected. Then, the the script of each of the matching Outcome is evaluated and each Outcome with a script evaluating to true is followed. If more than one Outcome script evaluates to true, the Process is paralleled. If no Outcome script evaluates to true, the Instance is ended by entering the closed-state.

Activity config

General
  • Name - Name of the Activity.
  • Version - Version of this Activity used in the Process. If a new version of this Activity is available and you want to use it, you have to manually update the version here. When a new Activity is added to the Process, automatically the latest version is placed.
  • Timeout in second - Once this time is elapsed, the Activity is closed and the Instance changes into the faulted-state. The default Timeout is two minutes. The timeout can be shortened and extended by entering a custom duration. If the Activity is left after a timeout, the first Outcome is followed. If multiple Outcomes have the same name as the first Outcome, all of them are followed. However, a continuation after a timeout does not effect the Outcome Scripts, meaning only Outcomes with Outcome Scripts evaluating to true are followed.
  • Hide in process graph - Controls if the Activity is hidden (Yes) or shown (No) in the Process Graph on the Execution Screen.
  • Continue on error - If this is set to Yes, the execution of the Instance continues even if the Activity failed. If set to No, the Instance fails when the Activity fails by entering the faulted-state. In the case of a continuation after an error, the first Outcome is followed. If multiple Outcomes have the same name as the first Outcome, all of them are followed. However, a continuation after an error does not effect the Outcome Scripts, meaning only Outcomes with Outcome Scripts evaluating to true are followed.
Condition

Condition Activity specific configurations

GENERAL

General interaction configuration, shared with most other Activities

  • Disable activity - Disables (Yes) or enables (No) the Activity. When disabled, the Activity is not executed and passed like a Connection by following the first Outcome. If multiple Outcomes have the same name as the first Outcome, all of them are followed. Disabling the Activity does not effect the Outcome Scripts, i.e., still only Outcomes with Outcome Scripts evaluating to true are followed.
  • Retry on error - If set to Yes, an automatic retry is executed up to ten times. If set to No, no retries are done. Retries are issued when the Activity failed so that the Instance would enter the faulted-state if the retry is disabled.
  • Additional text for task list - Description of this Activity shown to the Users in their task list. You can enter this text directly or use Process Context Expressions to compile it.
SETTINGS

Condition configuration

  • Use Sql - If set to No, the conditions are edited directly:

    • Condition - Clicking on Add creates a new condition:
      • Key - Name of the Outcome this condition applies to.
      • Value - Process Context Expression implementing the actual condition. If this Process Context Expression evaluates to true, the Outcome specified in Key will be followed.
      • - Deletes a configured condition
    • Else - If non of the configured conditions evaluate to true, the Outcome specified here is followed.

    If Use Sql is set to Yes, an SQL SELECT query is required to implement the condition:

    • Sql query - This SQL SELECT query has to return one column and one row only, holding the name of Outcome to leave the Activity. If more than one row is returned, everything after the first row is ignored. Parameters have to have a leading @ in the SQL SELECT query.
    • Parameters - Parameters of the SQL SELECT query are specified by clicking on Add:
      • Key - Name of the parameter without the leading @
      • Value - Value of the parameter entered either directly or determined a Process Control Expression.