Using the Run action
The Run action from the TaskBot package enables you to run one or more child bots. Configure the action to run the child bots repeatedly or with a delay, and to pass and retrieve values.
- In the Actions palette, double-click or drag the Run action from the Task Bot package.
In the Task Bot to run field, select the child bot:
Option Description Current Task Bot Runs the current bot recursively. Control Room file Click Browse and select a bot from your private workspace.
The system shows suggestions from the bots available in the private repository when you start typing the name of the bot you want to run. The location of the selected bot in the private repository is also displayed.Select a bot that you want to run:
- Click the Browse tab if you want to
select a bot from your private
The location of the selected bot in the private repository is also displayed.
- Click the Search tab if you want to
search for a bot from the public workspace
and your private workspace.
Suggestions about the bots available in the public and private workspaces are displayed when you start typing the name of the bot you want to run. The location of the selected bot in the public and the private workspaces is also displayed.
Variable Select from the following options:
- File: Insert a file variable that contains a bot.
- Control Room path: Enter an expression
beginning with Bots that contains a string
variable to specify the bot. For example
- The file path is case-sensitive.
- The bot must be in the same workspace as the parent bot.
- Click the Browse tab if you want to select a bot from your private workspace.
In the Input values fields, enter the values or
variables to pass to the child bot:
Note: You can pass a Window type variable from a parent bot to a child bot.
If you are configuring a bot with many input variables, use the Quick map option to automatically map variables that share the same name and data type. If the child bot contains variables for which there are no corresponding variables in the parent bot, the Quick map option creates new variables and maps them.
- Select an input variable to activate the text field.
Enter a value of the required data type.
The icon on the left-side of the text field indicates the data type.
- Optional: Select the repetition.
- Optional: Select the Delay between repetitions option and enter the delay time in the Minutes and Seconds fields.
Select the Upon error continue with next repetition or action in
this bot option.
For alternative error-handling options, use actions from the Error handler package.
In the Save outcome to a variable field, select either
the Multiple variables or
Option Description Multiple variables Click Add variable mapping to associate each dictionary key with a variable in the parent bot.
Use this option if you do not want to use actions to extract the dictionary values.
Use the Multiple Variables option to assign the output of the child bot to multiple variables directly. Using this option, you can set the multiple values returned by the child bot into the dictionary variable of the parent bot. You no longer need to assign the multiple outputs of the child bot to the individual variables of the parent bot using variable assignment commands. You can use the Dictionary package in the parent bot to extract the individual value assigned to the dictionary variable of the parent bot.
For example, when you migrate Enterprise 11 bots, many output variables need to be assigned individually after the Run task action, which increases the size of the bot. You can directly set parent bot variables within the Run task action using the multiple variables option.
Dictionary Insert or create a dictionary variable to hold the output variables and values in key-value pairs.
Each key in the dictionary is the variable name and corresponding value from the child bot.
- Click Save.