Decision Node

A Decision Node allows users to define conditional logic within a workflow. When added to a workflow, the decision Node evaluates specified conditions, and based on whether those conditions are met, it determines the path that subsequent nodes in the workflow will follow. This enables dynamic decision-making and customization of the process flow based on real-time inputs or predefined conditions.

Key Features:

  • Multiple Conditions: The Decision Node allows users to configure multiple conditions. Each condition can be a specific criterion that must be met for the process to continue down a particular path.
  • Conditional Logic: The Decision Node allows users to define conditions that determine the flow of execution based on a variety of inputs. These conditions can be configured using form fields, the status of previous workflow nodes, or datacenter keys. The conditions also support logical operators such as AND and OR for more complex decision-making.
  • Dynamic Flow Control: Once the conditions are evaluated, the Decision Node directs the flow to the appropriate next node(s) in the process. If multiple conditions are met, different paths can be followed, enabling flexible and adaptive workflows.
  • Flexible Execution Paths: Depending on the outcome of the condition(s), different future nodes in the workflow can be executed. For example:
    • If Condition A is true, execute Node 1.
    • If Condition B is true, execute Node 2.
    • If neither condition is met, execute Node 3 (default condition).

How to configure decision node

Steps to Add a Decision Node

  1. Click and drag the Decision Node to the workflow canvas where you want to add it.
  2. After dropping the Decision Node onto the canvas, an Add Node Modal will appear to configure the node.The modal will display the following configuration options:
    1. Node Name: Enter a name for the Decision Node
    2. Node ID: A unique identifier for the node.This is automatically generated but can be customized if needed.

Configure Conditional Logic

  1. Click on the Decision Node. Once the Decision Node is placed in the workflow, click on it to open the configuration panel where you can define its behaviour and conditions.
  2. After clicking on the node, you will be presented with the following configuration options:
    1. Node Description: This field allows you to provide a brief description or label for the Decision Node, explaining its purpose or role within the workflow. The description helps identify the node, especially in complex workflows.
    2. Condition 1 (Default Condition): By default, a Condition 1 will be added to the Decision Node. This is the first condition that will be evaluated as part of the decision-making process. You can configure this condition based on form fields, previous workflow node statuses, or data centre keys.
    3. Add Condition Button: Below Condition 1, you will find an Add Condition button. Clicking this button allows you to add additional conditions, enabling more complex decision-making. As you add conditions, they will be numbered sequentially (e.g., Condition 2, Condition 3, etc.).
  3. Condition Configuration - Each condition you add will have the following configuration options:
    1. Condition Name Field: This field allows you to give a descriptive name to the condition. It helps identify what the condition checks for (e.g., "Order Amount Check" or "Customer Status Check").
    2. Condition Type Dropdown: The drop-down allows you to select what the condition will evaluate:
    3. Form Field: Select from available form fields
    4. Workflow Node: Select the status or outcome of a previous workflow node (e.g. "Node 4 Completed").
    5. Data Center Checkbox: If the condition involves a data centre key, you can check the Data Center checkbox. This option specifically allows you to work with values that are stored in the data centre, such as configuration keys or external parameters that influence the workflow.
    6. Data Center Key: Select a data centre key (e.g., isHighPriority, region, etc.).
    7. AND/OR Button: Each condition has an AND/OR button to define how multiple conditions interact. This allows you to combine conditions using AND or OR logic:
      1. AND: All conditions must be true for the path to follow.

      2. OR: At least one condition must be true for the path to follow.

        This gives users the flexibility to combine conditions in various ways, creating complex decision trees.

**Condition 1:**

Name: "Check Order Amount"

Type: Form Field

Field: Numeric

Comparison: > 100

Data Center Checkbox: Unchecked

**Condition 2:**

Name: "High Priority Order"

Datacenter value: True

Key: isHighPriority

Comparison: == "true"

Data Center Checkbox: Checked
  1. Saving and Applying the Conditions: After you have configured all the necessary conditions, click Save to apply the changes.

The Decision Node will now evaluate these conditions when the workflow reaches this point. Depending on the outcome of the conditions (i.e., whether they evaluate as true or false), the workflow will proceed down the appropriate path.