Skip to main content

Automation Anywhere Connector

The Automation Anywhere Connector allows you to orchestrate an Automation Anywhere queue from your BPMN process with Automation Anywhere RPA to add work items to the queue and obtain work item results.

To start using the Connector, you need an instance with a license we configured via an API service. Refer to the official documentation page to learn more about installing and configuring the Automation Anywhere API service.

You also need a user account with the AAE_Queue Admin role to query and manage workload queues and work items in a Control Room. Read more about roles in the official documentation.

Create an Automation Anywhere Connector task​

To use an Automation Anywhere Connector in your process, either change the type of existing task using the wrench-shaped Change type context menu or create a new Connector task by using the Append Connector context menu. Follow our guide on using Connectors to learn more.

Make your Automation Anywhere Connector executable​

To work with Automation Anywhere, choose the required operation type in the Operation section and authentication type in the Authentication section and complete the mandatory fields highlighted in red in the Connector properties panel.

note

All the mandatory and non-mandatory fields depending on the authentication and operation selections you choose are covered in the upcoming sections.

Authentication​

You can choose among the available Automation Anywhere Connector authentication types according to your authentication requirements.

note

We advise you to keep your authentications and secrets data safe and avoid exposing it in the BPMN XML file by creating a secret:

  1. Follow our guide for creating secrets.
  2. Name your secret (i.e AUTOMATION_ANYWHERE_PASSWORD) so you can reference it later in the Connector.

Authenticate (username and password) authentication​

Select the Automation Anywhere Connector and fill out the following properties under the Authentication section:

  1. Select Authenticate (username and password) in the Authentication section.
  2. Set Password to Password to the secret you created (i.e. {{secrets.AUTOMATION_ANYWHERE_PASSWORD}}).
  3. Set Username to Username to the secret you created (i.e. {{secrets.AUTOMATION_ANYWHERE_UESRNAME}}).
  4. Select needed Multiple login type. If this value is set to true, you will be allowed multiple API sessions. For more information on multi-login, see multi-login user.

Authenticate (username and API key) authentication​

Select the Automation Anywhere Connector and fill out the following properties under the Authentication section:

  1. Select Authenticate (username and API key) in the Authentication section.
  2. Set Password to Password to the secret you created (i.e. {{secrets.AUTOMATION_ANYWHERE_PASSWORD}}).
  3. Set API key as API key to the secret you created (i.e. {{secrets.AUTOMATION_ANYWHERE_API_KEY}}). The API-Key is a 40-character string generated in the Control Room. See create and assign API key generation role documentation to learn more.

Authentication (refresh) token authentication​

Select the Automation Anywhere Connector and fill out the following properties under the Authentication section:

  1. Select Authentication (refresh) token in the Authentication section.
  2. Set Token to Token to the secret you created (i.e. {{secrets.AUTOMATION_ANYWHERE_TOKEN}}). It can be an authentication or refresh token. See authentication API documentation to learn how to generate an authentication token or see refresh token API documentation to learn how to generate a refresh token.

Configuration​

Control Room URL​

  1. Set Control Room URL to Control Room URL. The Control Room URL is the URL you use to access the Automation Anywhere Control Room. The Control Room URL is typically provided by the Automation Anywhere administrator and is specific to the organization's instance of the platform (i.e. https://domainname.myautomationanywhere.digital).

Operation types​

The Automation Anywhere Connector currently supports two operation types in the Operation type dropdown list: Add work item to the queue and Get work item result from queue by ID.

Add work item to the queue​

This operation provides the ability to add a work queue item in the specified queue. It corresponds directly to the respective Automation Anywhere API - Add Work Items to the queue API.

Usage​

  1. Select Add work item to the queue from the Operation type dropdown in the Operation section.
  2. Populate Authentication section as described in the respective section.
  3. In the Configuration section, set the Control Room URL field as described in the respective section.
  4. In the Input section, set Work queue ID. This is the identifier of a queue, where an item will be fetched from.
  5. In the Input section, set Work Item json Data that you want to pass together with the item. The Data has to comply with the Automation Anywhere API, and should contain the following semantics:
{
"coll_name": "your value",
"last_name": "Doe",
"email": "jane.doe@example.com"
}

Add work item to the queue response​

The operation Add work item to the queue returns information about the newly created item in the queue.

You can use an output mapping to map the response:

  1. Use Result Variable to store the response in a process variable. For example, myResultVariable.
  2. Use Result Expression to map fields from the response into process variables. It comes with a pre-filled value of ={itemId:response.body.list[1].id}. To use operation Get work item result from queue by ID, you need an itemId. This expression will add it to the context for you. Learn more in get work item result from queue by ID.

Response example:

{
"list": [
{
"id": "40957",
"createdBy": "25",
"createdOn": "2021-11-24T01:53:10.175335900Z",
"updatedBy": "25",
"updatedOn": "2021-11-24T01:53:10.175335900Z",
"version": "0",
"json": {
"TRN_ID": "A11",
"DATA": "mydata"
},
"result": "",
"deviceId": "0",
"status": "NEW",
"col1": "A11",
"col2": "",
"deviceUserId": "0",
"queueId": "0",
"comment": "",
"automationId": "0",
"totalPausedTime": "0",
"error": "",
"col6": "",
"jobExecutionId": ""
}
]
}

Get work item result from queue by ID​

This operation provides the ability to return the details of the specified work item from the work queue. It corresponds directly to the respective Automation Anywhere API - List Work Items in queue with filter by work item ID.

Usage​

  1. Select Get work item result from queue by ID from the Operation type dropdown in the Operation section.
  2. Populate Authentication section as described in the respective section.
  3. In the Configuration section, set the Control Room URL field as described in the respective section.
  4. In the Input section, set Work queue ID. This is the identifier of a queue, where an item will be fetched from.
  5. In the Input section, set Work item ID. This is the identifier of the item to be fetched.

Get work item result from queue by ID response​

Given you have a queue work item ID previously added to a queue, the operation Get work item result from queue by ID returns information about a certain work item.

You can use an output mapping to map the response:

  1. Use Result Variable to store the response in a process variable. For example, myResultVariable.
  2. Use Result Expression to map fields from the response into process variables. It comes with a pre-filled value of ={itemState:response.body.list[1].status}. You will see the itemState in the process variables. Its value will let you know if the item was processed or not.

Response example:

{
"page": {
"offset": 0,
"total": 5,
"totalFilter": 1
},
"list": [
{
"id": "11804",
"createdBy": "24",
"createdOn": "2020-05-26T10:19:34.786711300Z",
"updatedBy": "24",
"updatedOn": "2020-05-26T10:19:34.786711300Z",
"version": "1",
"json": {},
"result": "",
"deviceId": "0",
"status": "NEW",
"col1": "Brian",
"col2": "Matthews",
"col3": "bmatthews0@example.com",
"deviceUserId": "0",
"queueId": "20",
"comment": "",
"automationId": "0",
"totalPausedTime": "0",
"error": "",
"col6": "",
"col10": ""
}
]
}

Using Automation Anywhere Connector best practice​

There is no guarantee a queue item will be processed right away. In that case, we suggest building your BPMN diagram to periodically retry polling. To learn more, see an entry Solution with Timer and Loop on the Camunda BPMN examples page.

note

To avoid performance issues, it is recommended to limit the number of loop retries.