Run Bot sync for Mule flows
Use the Run Bot palette option that is part of the RPA Bots for Mule 4 connector to collect bot data for the Mule flow. The Run Bot is a synchronous call and a blocking operation requiring a customizable Execution Time Out for data to return.
- Install MuleSoft Anypoint Studio.
- Install RPA Bots for Mule 4 connector.
- Create MuleSoft Anypoint Studio flow project.
Add the Run Bot element 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 activity into your flow. For example, after
an HTTP listener activity.
The Mule Properties panel displays the Run Bot 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 synchronous 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.
Enter the Execution Time Out and Execution
Time Out Unit.
Прим.: The execution time out defines the time limit MuleSoft should wait for the bot to run and return data. If MuleSoft does not receive data within this limit, the operation expires and the flow does not proceed. Check the configuration and try again.Совет: Ensure the Execution Time Out exceeds the average bot runtime, including time for any possible delay. Execution time varies based on individual bot variables and data collection.
From the Advanced tab, select or enter the general
information, including the following:
Setting Function Run with RDP (11.3.x only) Select true if the bot should be deployed using a remote desktop. Run Elevated (Automation 360 only) True, if 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.
- Callback options: Specify a callback option for authentication and enter a Key and Value in the field provided.
- 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.
A failure 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.