Create a decision tree

Create a decision tree which is a simplified version of a business rule whilst still offering the visual representation of the rule.

When you configure an activity with the business rule, create new job, or custom service and if you double-click on the activity, the configured rule, process, or custom service is opened in a new tab.

You can also generate a decision tree using Generative AI.

The Chat with Copilot icon helps you open a Chat window where you can provide your request and get a response from the Copilot. For tips on how to use a Copilot, see Tips for using Copilot.

  1. Navigate to Workflow > Business rules.
    The Business rules page appears.
  2. Click New > Decision tree.

    The Decision tree - New business rule Design view opens in a new browser tab.

    • The system creates a new decision tree with some default properties.

    • By default, the Design tab is selected on the Modeling bar.

    • The Start node appears on the canvas.

  3. In the Properties panel, a default name (New business rule) appears in the Name field. You can change the name of the decision tree as required.
  4. Configure the properties for the decision tree as you do for a business rule. See Properties of a business rule.
  5. Create variables for the decision tree and set the variables as rule inputs and outputs.
    1. On the modeling bar of the decision tree, click Variables and click New.

      The New variable dialog box is displayed.

    2. Enter a Name for the variable.
      By default, the name of the variable becomes the ID of the variable; however, you can change the ID if needed.
    3. Select the variable Type, such as String. (Default: String)
    4. To set the variable as input, select Input.
      A decision tree supports dynamic complex variables as input. These input variables can hold the data from a table field within a document for validation, such as in creating a running total for a column.
    5. Provide a Value for the variable and click Add.

      If the output variable is set to String, you can set Error code or Error code message. For more information see Error codes and Manage error codes.

    6. Click Add another to add as many variables as needed without navigating away from the New variable dialog box or click Add and close to add one variable and close the dialog box.

      The Variables page appears.

    7. Similarly, create other variables.
      By default, all the variables are sorted on Name and displayed in ascending order. However, you can sort (ascending or descending) on the following columns: Name, ID, Type, Value, Input, and Output.
    8. To view the variables of a specific type, on the Type filter, select the variable type, such as Folder. (Default: All)
      The variables of the selected type are displayed.
      The Type filter only contains the variable types that exist in the list for the current decision tree.
  6. To set the order in which TotalAgility should process the input and output variables, perform the following steps:
    1. Click the Input/Output order link on the Variables page. The Input/Output variables dialog box is displayed.
    2. Select the Input or Output tab and use or .
    3. Click OK.
  7. Define your branching rule by adding the condition node, synchronization nodes and an end node.

    • The nodes are rectangular and added in a fixed position, that is, you cannot move the node using a mouse.

    • The orientation of nodes is vertical without the option to switch or rearrange the nodes.

    • A decision tree only supports automatic activities (except Export and Transfer); it does not support manual activities.

    • The Capture activities are not available for a decision tree.

  8. Release the decision tree.

Generate a decision tree using Generative AI

Use the Generative AI functionality to pass a request to the AI provider to generate a decision tree.

  1. Navigate to Workflow > Business rules.
    The Business rules page appears.
  2. Click New > Decision tree.

    The Decision tree - New business rule Design view opens in a new browser tab.

  3. Click the Chat with Copilot icon .
    The floating Chat with Copilot window appears with the following message: "Welcome <username>, what type of business rule would you like to create? An example request might be "Validate claim."

    You can pass the request as a plain text or provide an image as an input to get a response from the Copilot.

  4. See Generate a process using Copilot for additional steps.