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.

Procedure
  1. Navigate to Workflow > Business rules.
    The Business rules page appears.
  2. Select 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. Add activities, decisions, and end nodes to the Start node.
  4. 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.
  5. Configure the properties for the decision tree as you do for a business rule. See Properties of a business rule.
  6. Create variables for the decision tree and set the variables as rule inputs and outputs.
    1. On the modeling bar of the decision tree, select Variables and select 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 then select 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. Select Add another to add as many variables as needed without navigating away from the New variable dialog box or select 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.
  7. To set the order in which TotalAgility should process the input and output variables, perform the following steps:
    1. Select 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. Select OK.
  8. 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.

  9. 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.

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

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

  3. Select the Chat with Copilot icon in the bottom right corner.

    To chat with Copilot, you must have already configured the AI provider; otherwise, you are prompted to configure the provider.

    The floating Chat with Copilot window appears with the following message:

    • "Hello <username>, what type of business rule would you like to create?", and a predefined request that enables automatic business rule creation.

    • The Learn more link. Select the link to know more about Tungsten Automation's commitment to responsible AI and compliance.

  4. In the Chat box, enter your request:
    1. Do one of the following:

      • Use the default request available in the Chat window.

      • Use your own request as a plain text, such as "Approve expense claim".

      • Use the attachment icon to upload images and files and then enter your request such as "Create a process using the image".

        • When you upload an image, a thumbnail is displayed, and the image content is passed as input to the provider. The image types of JPEG, PNG, JPG, GIF, and WebP are supported. If an unsupported type is used, an error appears.

        • When you request the AI provider to create a business rule based on the image, not all models support the use of images. Currently, the supported model is "gpt-4-vision-preview."

        • When you request the AI provider to create a business rule based on the uploaded file, the vision model is not supported.

    2. Select the Return icon or press Enter.

    You can cancel your request by selecting the stop button . This stops the AI provider from generating the response.

    The Copilot returns the following response:

    • A business rule type (read-only) with a business rule type name. You can save and release the rule once the business rule is generated.

    • The read-only Properties panel.

    • A message in the Chat window: "A business rule <name> has been generated. Would you like to make any changes or are you ready to generate the business rule?"

    • The following options:

      • Accept business rule: The system saves the AI-generated business rule (read-only) with a name, and adds it to the design area. You can modify the rule further if needed. The newly generated is locked. The process properties are enabled.

        An audit log entry is recorded that the business rule is generated using generative AI.

      • Clear & Start over: Discards the current AI-generated business rule and resets the conversation, allowing the user to provide new requirements and generate a different rule from scratch.

        If you have started to create a rule but not saved or released it, you can still use Generative AI but the rule will be replaced. Once you save or release a rule, the Chat with Copilot icon disappears.

  5. Once a business rule is created by Copilot, you can do the following:
    1. Submit another request in the Chat box for a change in the existing business rule. For example, submit the following request for a change in the existing business rule: "Upload supporting documents after Check claim amount" or select another image and request to recreate the existing business rule using the image.
    2. Press Enter.

      The AI provider recreates the rule.