Queue connector methods
Summarize
Summary of Queue connector methods
The Queue connector methods in RPA Hub enable ServiceNow customers to create and manage work items within queues. This feature streamlines automation processes and enhances the operational efficiency of robotic process automation (RPA) projects.
Show less
Prerequisites
- Assign the bot process to the automation project via the Assign bot process option in RPA Desktop Design Studio.
- Set the QueueName property in the Queue connector to match the name defined in RPA Hub.
Key Features
- CreateJSONWorkItem: Generates a work item in JSON format with customizable key-value pairs.
- CreateStringWorkItem: Creates a work item by accepting a string input.
- GetWorkItems: Retrieves the count and details of work items based on specified criteria, with filtering options for various fields.
- PickWorkItem: Allows a bot to select a work item based on defined criteria, which aids in determining the number of robots needed for processing.
- ReleaseWorkItem: Facilitates the release of a work item after it has been processed by a bot.
- UpdateWorkItem: Enables updates to work items post-selection, allowing for criteria-based changes to their status or details.
Key Outcomes
Utilizing these methods allows ServiceNow customers to effectively manage automation workflows, ensuring that work items are created, tracked, and updated efficiently. This leads to improved resource allocation, better management of automation tasks, and enhanced overall productivity in RPA implementations.
The Queue connector methods enable you to create and then manage work items for queues in the RPA Hub.
Prerequisites
- Assign the bot process to the automation project by using the Assign bot process option from the Design tab of RPA Desktop Design Studio to access the work items. For more information, see Assign bot process to an automation project.
- Set the QueueName property by doing the following steps:
- In the RPA Desktop Design Studio, navigate to .
- Drag the Queue connector under Global Objects in the Project Explorer.
- Double-click the Queue connector.
- Under the Properties pane, in the QueueName property, enter the name of the Queue.Note:The name of the Queue must be the same as that defined in RPA Hub.
CreateJSONWorkItem
- Input
- Name
- On the CreateJSONWorkItem component bar, click the component settings icon
(
).
- To add a key, click the add key icon (
).
- Enter the key name in the field.
- To add more keys, repeat the previous steps.
- Click OK.
- Double-click the key field and enter the key value.
- Output
- WorkItemId
CreateStringWorkItem
- Inputs
- RequestContent
- Output
- WorkItemId
GetWorkItems
Returns the count and the details of the work items created under the queue based on the criteria you specify. The method provides a default criterion already but you can specify additional criteria.
- Input
- Limit
- Output
- TotalCount
To specify additional criteria for identifying and getting work items, do the following steps.
- Click the method settings icon (
).
- Configure the filters, as required. No filter is mandatory.
Table 1. WORKITEM CONFIGURATION Field Description Name Name of the work item. You can specify one of the following filters: - Equals: Name of the work item is exactly equal to the criteria you specify.
- Contains: Name of the work item contains characters you specify.
- StartsWith: The name of the work item starts with the characters you specify.
- EndsWith: The name of the work item starts with the characters you specify.
Type Type of the work item in string format. You can specify one of the following filters: - Equals: Type of the work item is exactly equal to the criteria you specify.
- Contains: Type of the work item contains characters you specify.
- StartsWith: The type of the work item starts with the characters you specify.
- EndsWith: The type of the work item starts with the characters you specify.
Status Status of the work item. Stage Stage of the work item. Priority Priority of the work item. DateType Date type of the work item. If you provide inputs to this field, you must also provide inputs to the FromData and ToDate fields also. FromDate If the method is picking work items within a date range, starting date in the range. ToDate If the method is picking work items within a date range, ending date in the range. Offset Number of work items that will be retrieved after the set limit. For example, if the limit is 20, the next picked work item starts from 21. OutRecords Returns the details of the work items in an object form. - Click OK.Note:A Data In port is created with each field you configure.
PickWorkItem
Enables a bot to pick a work item based on the given criteria. You can also configure additional criteria for the work item to be picked.
queryConditions included in the PickWorkItem component are considered for calculating the number of robots required to complete an unattended bot process execution, if the bot process is enabled with robot pool. For more information about calculating the number of robots, see Calculate the number of robots in RPA Hub. For more information about robot pool concepts, see Robot pool in RPA Hub.
- Input
- Priority
- Output
- WorkItemID
- Click the method settings icon (
).
- Enter the criteria as given in the table.
Table 2. PICK ITEM CONFIGURATION Field Description Name Name of the work item based on the following filters. - Equals: Name of the work item is exactly equal to the criteria you specify.
- Contains: Name of the work item contains characters you specify.
- StartsWith: The name of the work item starts with the characters you specify.
- EndsWith: The name of the work item starts with the characters you specify.
Selection exposes a Data In port.
Type Type of the work item based on the following filters. - Equals: Type of the work item is exactly equal to the criteria you specify.
- Contains: Type of the work item contains characters you specify.
- StartsWith: The type of the work item starts with the characters you specify.
- EndsWith: The type of the work item starts with the characters you specify.
Selection exposes a Data In port.
Stage Stage of the work item work item based on the following filters. - Equals: Stage of the work item is exactly equal to the criteria you specify.
- Contains: Stage of the work item contains characters you specify.
- StartsWith: Stage of the work item starts with the characters you specify.
- EndsWith: Stage of the work item starts with the characters you specify.
Selection exposes a Data In port.
Name Data out port that returns the name of the work item. Type Data out port that returns the type of the work item. Remarks Data out port that returns remarks on the work item. Stage Data out port that returns the stage of the work item. JSON PATH NOTATIONS Data out port that returns the JSON path notation work item.
ReleaseWorkItem
- Inputs
- WorkItemId
- Outputs
- Return
UpdateWorkItem
- Click the method settings icon (
).
- Enter the criteria as given in the table.
Table 3. UPDATE ITEM CONFIGURATION Field Description Stage Updates the stage of the work item. DeferredTill Option to specify a time duration during which the same work item will not be picked. For example, 5 minutes. Name Name of the work item. Type The type of the work item. Remarks Supporting remarks on the work item. SLA SLA of the work item completion. ResponseContent The content that returns in response. JSON PATH NOTATIONS JSON path notation.
- Inputs
- WorkItemID