Documentation

# Define Flow Control

Define Flow Control

Flow control defines how data flows through the different components of a document processing workflow.

You can utilize the following Flow Controls to build your own Use case.

  1. Loop
  2. IF ELSE
  3. Variable Assigner

# 1. Loop

The Loop in flow control can be used to automate repetition of tasks or processes across a set of data. It ensures consistency and efficiency by systematically processing each item in a sequence, executing them one by one. Perform the following steps to create a loop:

  1. Click the plus icon on the agent or any component
    The list containing all existing AIs, Flow controls, Integrators, tools and knowledge appears
  2. In Flow Control section, select the Loop option
  3. Click Add Component to place a component in the Loop
  4. Click Plus icon to add more components
  5. Once this is done, click the Loop
  6. In the Loop window that appears on the right-hand side of the page, perform the following steps:
    • Input*: Choose a list of elements from previous components to loop through individually
    • On Error Action*: Choose whether to skip failed iterations and continue or stop the loop and throw error on failing the workflow
    • Output: Define the output of the loop. By default, it uses the output of the last processed component within the loop
  7. Click outside the window to save the settings
    Note:
    • Click three dots on the top-right and choose Delete option to delete the loop
    • Choose Detach Loop option to detach the loop from the added agents within it

# 2. IF ELSE

IF ELSE involves managing the sequence and execution of a use case based on predefined conditions like IF, ELSE IF and ELSE. It helps to define the data flow among multiple agents and their respective attributes as parameters.

  1. Click the plus icon on the agent or any component
    The list containing all existing AIs, Flow controls, Integrators, tools and knowledge appears
  2. In the Flow Control section, select IF ELSE option. The If Else element appears
  3. Click the element to expand the panel in the right-hand side of the page
  4. Define the conditions for the newly created path by performing the below steps:
    1. In If field, define the conditions that determine which actions to execute when the conditions are met
    2. Click Add Condition to add more if conditions
    3. Click the Else if button to add else if conditions. It defines the conditions that determine which actions to execute when the conditions are met
    4. You can use the Else condition to specify the actions to execute when none of the If or Else If conditions are satisfied
  5. Once this is done, ensure all conditions are configured with valid Field, Condition and Value
  6. Click outside the window to save the settings
    Note:
    1. Click three dots on the top-right and choose Delete option to delete IF ELSE
    2. Choose Duplicate option to duplicate the IF ELSE element

# 3. Variable Assigner

The variable assigner assigns values to variables used during establishing the workflow pipeline. Perform the following steps involve variable assigner in the workflow:

  1. Click the plus icon on the agent or any componentThe list containing all existing AIs, Flow controls, Integrators, tools and knowledge appears
  2. In the Flow Control section, select the Variable Assigner option. The Variable Assigner element appears
  3. Click the element to expand the panel in the right-hand side of the page
  4. Provide the values to assign the variables by performing the following steps:
    1. Select the variable in Label field whose values need to be set
    2. Select the operation type in Operation drop-down. Overwrite will replace any existing value with new one, while Append will add the new value to the list
    3. In the Value field, select output of any previous component to be stored as variable
  5. Click outside the window to save the settingsNote:Click three dots on the top-right and choose Delete option to delete the assignerChoose Duplicate option to duplicate the variable assigner