Run Bot async for Mule flows
Use the Run Bot Async palette option that is part of the RPA Bots for Mule 4 connector to collect bot data for the Mule flow. The Run Bot Async is an asynchronous call and a non-blocking operation that requires the On Bot Result listener to return data.
- Install MuleSoft Anypoint Studio.
- Install RPA Bots for Mule 4 connector.
- Create MuleSoft Anypoint Studio flow project.
Add the Run Bot Async to the Mule integration flow to run a selected bot.
- If the selection you want is not listed, you can optionally enter the field content. For example, you can enter the ID number for an item. The ID number is listed in parenthesis at the end of each selection name or Automation Anywhere Control Room.
- To manually enter data in a field, toggle the expression mode check box.
- Click Refresh Metadata in the right panel to refresh the list of Input and Output variables.
With your configuration file selected, in the Flow panel, drag the
Run Bot Async activity into your flow. For example,
after an HTTP listener activity.
The Mule Properties panel displays the Run Bot Async configuration options.
- Configure the connection to the Control Room. In the Basic Settings area, next to the Connector configuration field, click the Plus to add a connection.
In the Automation Anywhere Config dialog box, select the
connection type and enter the corresponding connection information:
- Basic Authentication Connection: Enter the Control Room URL, user name, and password.
- API Key Authentication Connection: Enter the Control Room URL, user name, and API key.
In the Source tab, select the default HTTP listener
config or the custom HTTP listener created from the drop-down list.
If the HTTP listener config is not available from the drop-down list, click the Plus to add a connection.
The callback URL in the configuration can be used for all the Mule flow.
If you are using a Cloud deployment, the base callback URL is optional.
An On-Premises deployment requires the callback URL for the operation to retrieve the bot output. If the callback URL is blank for On-Premises deployment, the value is set to localhost by default.
- Click Test Connection.
- When the connection is successful, click OK to close the Test connection box. Then click OK to close the Automation Anywhere Config dialog box.
Select the General tab, and enter the following
- Bot (Required): Select a bot to run from the list or enter the bot ID.
Run As User/Device (Required):
Version Action Automation 360 Cloud users Select the user credentials to run the bot or enter the run-as user ID.
When you are entering the run-as user ID, multiple values are acceptable with a comma as a delimiter (that is, 1, 2, 3).
Version 11.3 users Select the device to run the bot or enter the device ID.
When you are entering the device ID, multiple values are acceptable with a comma as a delimiter (that is, 1, 2, 3).
Version Action Automation 360 Cloud users Optional: Select the device pool for running the bot or enter the device pool ID. Version 11.3 users The default option Not Supported for this Control Room is selected.
- Optional: Select the type of variable.
- Toggle Expression check box: Enter the literal text in the field. For example, #[ payload ].
- Select from list of available input and output variable types
supported for your environment:
Version Action Automation 360 Cloud users
- List of Any Type
- Dictionary of Any Type
Version 11.3 users
- List- Predefined answer
Click Refresh Metadata, if required to view the list of Input and Output variables.
Bot Result Key: Specify the Bot
Result Key that is identical to the On Bot
Result. Use this option to collect the bot result from the callback response from the Control Room.
Use this option for any number of Run Bot Async activities you set and ensure the On Bot Result key is identical in the receiving Mule flow: Add On Bot Result to Mule flows.
From the Advanced tab, select or enter the general
information, including the following:
Setting Function Run with RDP (11.3.x only) Set as True if the bot should be deployed using a remote desktop. Run Elevated (Automation 360 only) Set as True if the bot should be run with elevated permissions. Override Default Device (Automation 360 only) Set as False if you want the default device.Set as True if you want to run the bot on a device from the device pool. Then select the device from the pool.Прим.: Ensure you have previously provided the Device Pool ID in the General tab. Number of Run As Users to Use (Automation 360 only) Use an integer to indicate how many Run as Users should be used from the list of the specified Run as User Ids.
The system selects the specified number of run-as users with the least number of tasks queued for the run-as user at the time of the deployment request. If the value is 0 (zero), then all users will be used. If the number is greater than the number of users provided or less than 0, an error is displayed.
- Callback options: Specify a callback option for
authentication and enter a Key and
Value in the field provided.
When a callback option is specified, the Run Bot Async key and the corresponding value is also generated and identical to the key for On Bot Result.Trouble: If Mule Flow wants to override the callback URL in the configuration, the URL can be reset in Callback options in the Advance section. To override the callback URL:
- Set the key to __CallbackUrlOverrides__.
- Set the value to the callback URL.
- Optional: Output
- Optional: Connection- Set the reconnection strategy type to
reconnect to the Control Room for data transfer in the event
of a failed connection.
This can occur when multiple users are connecting to the Control Room at the same time and the bandwidth is exceeded.
- Select Standard for the Reconnection strategy.
- Enter 2000 for Frequency (ms) to specify 2 seconds.
- Enter 2 for Reconnection
The recommended number of attempts is 2- 5.
- Callback options: Specify a callback option for authentication and enter a Key and Value in the field provided.