- In Orchestrator, consider you have a queue populated with items.
- In Studio, from the Activities panel, drag a Get Transaction Item activity to the Designer panel.
- In the Properties panel, in the QueueName field, type the name of the populated queue from Orchestrator, between quotation marks.
Note: The queue names are not case sensitive. For example, "New_QueUe" and “new_queue” are the same.
- Create a QueueItem variable. This variable stores the first item from a queue, according to its priority and deadline. When
placed in a loop, the Robot iterates through all queue items. After a queue item passes through this activity it is NOT processed,
and the status of the item changes to In Progress.
- In the TransactionItem field, enter the QueueItem variable created previously.
- From the Activities panel, drag a Decision activity under the Get Transaction Item activity.
- Create your automation requirements. For example, add the transaction items to an Excel spreadsheet and send e-mails with
this information.
- In the Properties panel, in the Condition field, type a condition (for example, the queue item is empty) based on which the status of the item can change.
- From the Activities panel, drag a Set Transaction Status activity and connect it to the False branch of the Decision activity. All transaction items that pass through this activity do not meet the condition added at step 7.
- In the Properties panel, from the Status drop-down list, select Successful. This status is applied to all queue items that pass through this activity.
- In the TransactionItem field, enter the QueueItem variable used at step 5.
- (Optionally) Click the Browse button next to the Analytics field and enter the data that you want to be displayed in the Item Details window, in the Analytics field.
- (Optionally) Click the Browse button next to the Output field and enter the data that you want to be displayed in the Item Details window, in the Output field.
Note: This information is only displayed if the queue item is processed successfully.
- Drag another Set Transaction Status activity to the Designer panel and connect it to the True branch of the Decision activity. All queue items that pass through this activity meet the condition added at step 7.
- In the Properties panel, from the Status field, select Failed. This status is applied to all queue items that pass through this activity.
- In the TransactionItem field, enter the QueueItem variable used at step 5.
- From the ErrorType list, select Business or Application, depending on the condition you put in the Decision activity. For example, an empty queue item could be an application exception, while a transaction value being smaller than
a standard value could be a business exception.
- In the Reason field, type a string to explain why the exception was triggered. After the project is executed, this information is displayed
in the Item Details window.
- Connect both Set Transaction Status activities to the Get Transaction Item activity. This creates a loop and enables you to iterate through all queue items. A basic automation project should look
as in the following screenshot.
A mapping of the properties in the Set Transaction Status activity (on the left) and their corresponding fields in the Item Details window in Orchestrator.
To retrieve specific data from a queue item, you can use the SpecificContent()
function. Write the name of the argument that was used to add information to the queue between quotation marks in brackets.
For example, the screenshot above displays the Value field of an Assign activity. It enables you to retrieve the value attributed to a queue item (displayed in the Item Details window, under Specific Data, in Orchestrator) and assign it to a string variable, so that you can process it later.
transItem
- is a QueueItem variable used to store transaction items.
.SpecificContent
- is the function that retrieves information from transaction items.
("transactionID")
- is the name of the argument that was added in the ItemInformation window to populate the queue items with data. The argument name is also displayed in the Item Details window, under Specific Data, in Orchestrator.
.ToString
- is a function used to convert the ID of the queue, which was initially an integer, to a string.