Table of Contents

Search

Taskflows

Taskflows

Decision step

Decision step

When you add a Decision step, you set some properties.
You can configure the following Decision step properties:
Name
The name of the Decision step. The name can contain only alphanumeric characters, underscores (_), spaces, and Unicode characters. The name can't contain curly brackets {}.
Decision
The taskflow takes a decision based on the fields, formulae, and paths you define here.
Use one of the following options to specify the path:
  • Field
    . Select an input field, output field, or temporary field from the list of fields you define under the
    Start
    step.
    Enter conditions and values that you want the Decision step to base a decision on.
    The conditions available depend on the field that you select.
    For example, if you select a field of type
    Simple
    Text
    , the following conditions are available:
    • Equals
    • Starts With
    • Ends With
    • Starts with any of
    • Contains
  • Formula
    Open the formula editor to create a complex expression.
    You can define a path and set appropriate conditions. You can also evaluate simple and complex expressions directly in the Decision step with no dependency on the prior steps.
    When you select the
    Formula
    option and define the expression, the following conditions are available:
    • Contains
    • Equals
    • Starts with
    • Ends with
    • Starts with any of
    • Not equal to
    • Less than
    • Less than or equal to
    • Greater than
    • Greater than or equal to
    However, you must select the appropriate conditions based on the return type of the functions used in the expression.
    The following table describes the supported and not supported conditions based on the return types:
    Return type
    Supported conditions
    Unsupported conditions
    String and Boolean
    Contains
    Equals
    Starts-with
    Ends with
    Starts with any of
    Not equal to
    Less than
    Less than or equal to
    Greater than
    Greater than or equal to
    Number and Integer
    Contains
    Equals
    Starts-with
    Ends with
    Starts with any of
    Not equal to
    Less than
    Less than or equal to
    Greater than
    Greater than or equal to
    None
    DateTime
    Contains
    Equals
    Starts-with
    Ends with
    Starts with any of
    Not equal to
    Less than
    Less than or equal to
    Greater than
    Greater than or equal to
    Default is
    Field
    .
You can enter text values against the conditions you select.
You can add multiple conditions to a Decision step. Each condition is a potential data path.
For each path that you add, a corresponding branch appears on the UI. Drag branches to rearrange the order in which the branches appear on the UI.
Most Decision steps have an Otherwise path. This path handles execution if no data meets the conditions in your tests.

Evaluating Paths

A taskflow evaluates conditions based on the criteria you specify. Ensure that you construct paths with non-intersecting conditions.
For example, you create a Data Decision step with the following paths:
  • Path 1: Field less than or equal to 100.
  • Path 2: Field less than or equal to 75.
  • Path 3: Field less than or equal to 25.
  • Path 4: Otherwise
If the integer field for which the Data Decision step was created has a value of 25, the Data Decision step takes path 1. This is because 25 is less than 100 and path 1 is the first option.
To ensure that the Data Decision step follows the "Field less than or equal to 25" path, re-create the paths with the following criteria:
  • Path 1: Integer between 0 and 25
  • Path 2: Integer between 26 and 75.
  • Path 3: Integer between 76 and 100.
  • Path 4: Otherwise
Important
: The taskflows evaluates conditions in a top-down manner. Ensure that the Otherwise branch is the last path.
A Decision step can lead to another Decision step. For example, a branch could run if an annual income exceeds $100,000. The next decision test along the same path could test if the city is Boston, or otherwise. Using this technique, you use Boolean AND logic because you base the test for the second condition on the true branch of the first condition. In this example, you use the Decision step to set the condition "Annual Revenue exceeds $100,000 AND city is Boston".
Similarly, to support Boolean OR logic, you can add a test for the second condition on any branch.
When the Data Task step of a taskflow fails, you can make decisions based on the output fields of the data task.
You can select the output fields when one of the following conditions are met:
  • The
    On Error
    field is set to
    Ignore
    or
    Custom error handling
    .
  • The
    Fail taskflow on completion
    option is set to
    If this task fails
    .
If you select the field as the entire data task, the Decision step takes the
Is set
path by default.

0 COMMENTS

We’d like to hear from you!