Run Bot async for Mule flows

Use the Run Bot Async palette option that is part of the Automation Anywhere for MuleSoft 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.


  1. Install MuleSoft Anypoint Studio.
  2. Install Automation Anywhere for MuleSoft connector.
  3. Create MuleSoft Anypoint Studio flow project.
Important: Before you begin, if planning to use Advanced Bot Run Settings, review those details near the end of this topic to validate your desired setting exists in the release you use.

Add the Run Bot Async to the Mule integration flow to run a selected bot.

Mule Flow tips:
  • 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.


  1. 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.
  2. 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.
  3. 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.
  4. 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.

  5. Click Test Connection.
  6. When the connection is successful, click OK to close the Test connection box. Then click OK to close the Automation Anywhere Config dialog box.
  7. Select the General tab, and enter the following information:
    1. Bot (Required): Select a bot to run from the list or enter the bot ID.
    2. 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).

    3. Device Pool:
      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.
    4. Bot variables:
      1. Optional: Select the type of variable.
      2. Toggle Expression check box: Enter the literal text in the field. For example, #[ payload ].
      3. Select from list of available input and output variable types supported for your environment:
        Version Action
        Automation 360 Cloud users
        • Any
        • String
        • Number
        • DateTime
        • Boolean
        • List of Any Type
        • Dictionary of Any Type
        Version 11.3 users
        • Any
        • Array
        • List- Predefined answer

        Click Refresh Metadata, if required to view the list of Input and Output variables.

    5. Optional: 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.
  8. Optional: From the Advanced tab, select or enter the general information, including the following:
    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.
    Note: 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.

      Important: 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.

      1. Select Standard for the Reconnection strategy.
      2. Enter 2000 for Frequency (ms) to specify 2 seconds.
      3. Enter 2 for Reconnection Attempts.

        The recommended number of attempts is 2- 5.