Run Bot sync for Mule flows

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

Prerequisites

  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 element 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.

Procedure

  1. 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.
  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 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.

  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.

  8. Enter the Execution Time Out and Execution Time Out Unit.
    Note: 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.
    Tip: 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.
  9. Optional: From the Advanced tab, select or enter the general information, including the following:
    SettingFunction
    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.
    Note: 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.

      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.