Queue connector methods
Summarize
Summary of Queue Connector Methods
The Queue connector methods in RPA Hub are designed to create and manage work items for automation projects. Understanding these methods allows you to effectively handle tasks within your queues, ensuring that automation processes run smoothly and efficiently.
Show less
Key Features
- CreateJSONWorkItem: Creates a work item in JSON format with customizable fields such as type, stage, and SLA. You can also specify sensitive content that will be encrypted.
- CreateStringWorkItem: Allows creation of work items using string inputs. Sensitive content can be stored in an encrypted format.
- GetWorkItems: Retrieves count and details of work items based on specified criteria, including name, type, status, and priority.
- PickWorkItem: Enables a robot to select a work item based on criteria, optimizing the allocation of bots.
- ReleaseWorkItem: Releases a work item that has been processed by a bot.
- UpdateWorkItem: Updates details of a selected work item, including sensitive information and transaction stages.
Key Outcomes
By employing these methods, ServiceNow customers can streamline their automation workflows. Key benefits include:
- Efficient management of work items, ensuring timely execution based on priority.
- Secure handling of sensitive information, maintaining compliance with data protection standards.
- Improved visibility and control over work item status and updates, enhancing overall process transparency.
The Queue connector methods enable you to create and 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
- Output
- WorkItemId
- On the CreateJSONWorkItem method bar, click the method settings icon (
).
- Enter the criteria as given in the table.
Table 1. CREATE ITEM CONFIGURATION Field Description CONFIGURATION INPUT FIELDS Type The type of the work item. For example, for an accounting system queue, savings and current are types of accounts.
To configure the input field, see Configure port properties.Stage Updates the stage of the work item. Custom field to maintain different stages of the transaction.
SLA Service Level Agreement (SLA) of the work item completion. JSON PROPERTIES JSON PATH NOTATIONS Name Key-value pair (JSON content) for the request content. To add a key, do the following:- Click the add key icon (
).
- Enter the key name in the field.
- To add more keys, repeat the previous steps.
- To pass the value to these fields, see Configure port properties.
Sensitive Sensitive content that is passed when the work item is created. Select this option as sensitive, then the data is encrypted and stored in the Sensitive Request Content field in the new work item in RPA Hub. For more information about the work item form, see Work item form in RPA Hub.
With this functionality, you can pass sensitive information through queues.
For example, if you want customer data to be encrypted in the queue, you must use the Sensitive field to store customer details such as credit card number, address, and so on.
- Click the add key icon (
- Click OK.
CreateStringWorkItem
- Input
- RequestContent
- Output
- WorkItemId
To specify additional criteria for creating string work items, do the following steps.
- On the CreateStringWorkItem method bar, click the method settings icon (
).
- Enter the criteria as given in the table.
Table 2. CREATE ITEM CONFIGURATION Field Description INPUT FIELDS SensitiveRequestContent Stores sensitive content in encrypted format in the new work item. To configure the input field, see Configure port properties.
With this functionality, you can pass sensitive information through queues.
For example, if you want customer data to be encrypted in the queue, you must use the SensitiveRequestContent field to store customer details such as credit card number, address, and so on.
Stage Updates the stage of the work item. Custom field to maintain different stages of the transaction.
Type The type of the work item. For example, for an accounting system queue, savings and current are types of accounts.
To configure the input field, see Configure port properties.SLA Service Level Agreement (SLA) of the work item completion. - Click OK.
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 3. WORKITEM CONFIGURATION Field Description INPUT FILTERS 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 Updates the stage of the work item. Custom field to maintain different stages of the transaction.
Priority Priority of execution: - Critical
- High
- Medium
- Low
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. OUT FIELDS 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 robot 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 the work allocated, 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
To specify additional criteria for picking work items, do the following steps.
- Click the method settings icon (
).
- Enter the criteria as given in the table.
Table 4. PICK ITEM CONFIGURATION Field Description CONFIGURATION INPUT FILTERS 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.
Status Status of the work item for the robot to select. OUT FIELDS 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. RequestContent String content for the work item. Picks the stored content when the work item is created. SensitiveRequestContent The sensitive content from this field is picked, decrypted and passed to the RPA Desktop Design Studio or robots. JSON PROPERTIES JSON PATH NOTATIONS Data out port that returns the JSON path notation of a work item. Click the add key icon (
) to add a key name.
JSON can be passed in both RequestContent and SensitiveRequestContent fields.
While picking work item, the JSON data is picked from a work item. For example, if a key-value pair "City: Mumbai" (City is key and Mumbai is value) is in the RequestContent field and "City: Delhi" (City is key and Delhi is value) is created in SensitiveRequestContent field. When you try to pick the same work item, since the key is same for both fields, the SensitiveRequestContent field is given precedence and that output is retrieved from this field.
- Click OK.
ReleaseWorkItem
- Input
- WorkItemId
- Output
- Return
UpdateWorkItem
- Inputs
- WorkItemId
To specify additional criteria for updating work items, do the following steps.
- Click the method settings icon (
).
- Enter the criteria as given in the table.
Table 5. UPDATE ITEM CONFIGURATION Field Description CONFIGURATION INPUT FIELDS Stage Updates the stage of the work item. Custom field to maintain different stages of the transaction.
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. For example, for an accounting system queue, savings and current are types of accounts.
To configure the input field, see Configure port properties.Remarks Supporting remarks on the work item. SLA Service Level Agreement (SLA) of the work item completion. ResponseContent String content for the work item. Updates the stored content of a work item. SensitiveRequestContent Updates the sensitive content of a work item. JSON PROPERTIES JSON PATH NOTATIONS Name Key-value pair (JSON content) for the request content. To add a key, do the following:- Click the add key icon (
).
- Enter the key name in the field.
- To add more keys, repeat the previous steps.
- To pass the value to these fields, see Configure port properties.
Sensitive Sensitive content is updated for a work item. With this functionality, you can pass sensitive information through queues.
For example, if you want customer data to be encrypted in the queue, you must use the Sensitive field to store customer details such as credit card number, address, and so on.
When you add a key-value pair "City: Mumbai" in SensitiveRequestContent field and add another key-value pair "Country: India" in JSON Path Notation and the UpdateWorkItem is executed. Then, in the SensitiveRequestContent field, the output is combined to "City: Mumbai" and "Country: India".
- Click the add key icon (