Queue connector methods

  • Release version: Washingtondc
  • Updated February 1, 2024
  • 5 minutes to read
  • Summarize
    Summarized using AI
    This content was generated using new OpenAI-powered functionality. Results are provided on an as is basis and are not guaranteed to be accurate or complete.

    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 full answer 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

    1. 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.
    2. Set the QueueName property by doing the following steps:
      1. In the RPA Desktop Design Studio, navigate to Toolbox > RPA Hub > Queue.
      2. Drag the Queue connector under Global Objects in the Project Explorer.
      3. Double-click the Queue connector.
      4. 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

    Creates a work item for the queue in the JSON format.
    Input
    Name
    Type
    Priority
    Stage
    SLA
    To create the key-value pairs in a JSON object, do the following actions:
    1. On the CreateJSONWorkItem component bar, click the component settings icon (Component settings icon.).
    2. To add a key, click the add key icon (Add key icon.).
    3. Enter the key name in the field.
    4. To add more keys, repeat the previous steps.
    5. Click OK.
    6. Double-click the key field and enter the key value.
    Output
    WorkItemId
    IsNameExists

    CreateStringWorkItem

    Creates a work item in a queue in the RPA Hub by accepting a string.
    Inputs
    RequestContent
    Name
    Type
    Stage
    SLA
    Output
    WorkItemId
    IsNameExists

    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.

    1. Click the method settings icon (Method settings icon).
    2. 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.
    3. 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.

    1. Click the method settings icon (Method settings icon).
    2. 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

    Releases a work item that has been accepted and executed by a bot. You must execute PickWorkItem method before executing this method.
    Inputs
    WorkItemId
    Outputs
    Return

    UpdateWorkItem

    Enables a bot to update a work item after picking it with the PickWorkItem method based on specified criteria. You can configure additional criteria for the work item to be picked. You must execute PickWorkItem method before executing this method. To configure, do the following steps.
    1. Click the method settings icon (Method settings icon).
    2. 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
    RequestContent
    ReleaseMode
    Priority
    Status
    Exception Type