RPA Hub actions and subflow

  • Release version: Xanadu
  • Updated August 1, 2024
  • 6 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 RPA Hub actions and subflow

    This content explains the integration between ServiceNow Workflow Studio and RPA Hub, enabling seamless execution of robotic process automation (RPA) through actions and subflows. ServiceNow customers can leverage these functionalities to invoke, control, and monitor RPA processes directly from Workflow Studio, enhancing automation workflows with bi-directional communication to RPA Hub.

    Show full answer Show less

    Flows and subflows are designed within Workflow Studio and can be triggered through RPA Desktop Design Studio, unattended or attended robots. Additionally, enabling the client callable option allows client scripts to initiate RPA Hub flows or subflows, facilitating flexible automation triggers.

    RPA Hub Actions

    RPA Hub actions provide a wide range of capabilities to manage work items, assign users, control bot processes, and validate packages. Key actions include:

    • Add WorkItem to Queue: Adds work items with encrypted sensitive content support and returns a WorkItem ID.
    • Assign/Unassign Users: Assign or unassign users to attended automation processes or robots.
    • Change Life Cycle Stage: Manage bot process life cycle stages such as Build, Published, and In Maintenance with role-based permissions.
    • Fetch Jobs and Status: Retrieve process jobs and execution statuses from RPA Hub, including job details and robot states.
    • Start and Stop Processes: Trigger or stop bot processes, including support for graceful stops and handling robot pools.
    • Update Process Parameters and WorkItems: Modify process parameters or update work queue items with encrypted data support.
    • Verify Package HashCode: Validate manually uploaded automation package zip files against RPA Hub records for integrity assurance.

    These actions expose detailed inputs and outputs, enabling precise control and monitoring of RPA processes within ServiceNow workflows.

    RPA Hub Subflows

    Subflows extend action capabilities by grouping related processes into reusable workflows. Important subflows include:

    • Import Package Version Attachment: Automates migration of package attachments (automation zip files) between environments, with optional email notifications upon success or failure.
    • Start Process: Initiates a bot process and returns comprehensive job and robot status information, identifying failed or pending robots.
    • Stop Process: Stops a bot process with optional graceful stop functionality and provides detailed robot and job status updates.

    Practical Benefits for ServiceNow Customers

    • Streamlined Automation: Integrate RPA execution seamlessly within ServiceNow workflows, reducing manual intervention and accelerating process automation.
    • Comprehensive Control and Monitoring: Manage bot lifecycles, assigned users, and execution status directly from ServiceNow, improving operational visibility.
    • Secure Data Handling: Support for encryption of sensitive work item data ensures compliance and security when passing information to robots.
    • Environment Migration Support: Automate package attachment migrations with notification capabilities, simplifying deployment across environments.

    By utilizing these actions and subflows, ServiceNow customers can enhance their automation capabilities, improve accuracy, and maintain better governance over RPA processes.

    Two-way integration of actions and subflows in Workflow Studio and RPA Hub for a seamless robot execution.

    Flows and actions overview

    The flows and actions are built using ServiceNow Workflow Studio, so make sure you’re familiar with the Building actions in Workflow Studio and Building subflows in Workflow Studio basics.

    Invoke flows or subflow

    Invoke the flow or subflow via RPA Desktop Design Studio, Unattended Robot, or Attended Robot. For more information, see the topics listed in Flow Designer components.

    Enable the client callable option for a flow or subflow

    Enable a client script to trigger an RPA Hub flow or subflow. For more information, see Enable the client callable option on an RPA Hub flow or subflow.

    RPA Hub actions

    The following table shows the detailed descriptions, action inputs, and action outputs of RPA Hub actions.

    Table 1. RPA actions
    Action Description Action inputs Action outputs
    Add WorkItem to Queue Action Adds WorkItem in a specified queue in the RPA Hub application and returns the WorkItem ID.
    • Queue Name: Record
    • Name: String
    • Content: String
    • Type: String
    • Priority: String.Choice
    • Stage: String
    • SLA: Date/Time

    The maximum limit for Content field (Request Content and Response Content) is 8000 characters.

    If the Is Work Item Name Sensitive check box on the associated work queue form is selected, the data in the Request Content field is encrypted. Sensitive data with encryption is stored in the work item, so that it can be passed to the RPA Desktop Design Studio or robots.

    • Action Status: Object
    • WorkItemID: GUID
    • IsNameExists: Boolean
    • status: String
    • message: String
    Assign User to Attended Automation Process Action Assigns a user to the attended automation process.
    • Process Name: Record
    • Username: Record
    • Action Status: Object
    • status: String
    • Message: String
    Assign User to Attended Robot Action Assigns a user to the attended robot. Username: Record
    • Action Status: Object
    • status: String
    • Message: String
    Change Life Cycle Stage Status of a Bot Process Action Changes the life cycle stage status of a bot process that is not retired.

    If a bot process is in Build life cycle stage status, if you have the required role, you can update it to Published state, but you cannot update it to In Maintenance.

    If a bot process is in Published life cycle stage status, if you have the required role, you can update it to In Maintenance state, and vice versa.

    • Process name: Record
    • Life cycle stage status: Choice
    • result: String
    • message: String
    • Action Status: Object
    Fetch Created Jobs Action Fetches the process jobs in RPA Hub.
    • Process Number: String
    • Robots: Array[String]
    • Action Status: Object
    • Result: String
    • Jobs: Array[String]
    • startedRobots: Array[String]
    • pendingRobots: Array[String]
    Fetch Execution Status Action Fetches the execution status of a specific process job in RPA Hub. Process Job Number: String
    • Action Status: Object
    • ProcessJob: Object
      • Process Name: String
      • Robot Name: String
      • State: String
      • Started At: Date/Time
      • Completed At: Date/Time
      • Message: String
    • status: String
    • message: String
    Fetch Work Item Status Action Fetches the status of specific work queue items, asynchronously. Work Queue Item ID: GUID
    • Action Status: Object
      • Code: Integer
      • Message: String
    • WorkItem: Object
      • sysId: String
      • name: String
      • type: String
      • priority: String
      • status: String
      • lockedBy: String
      • additionalComments: String
      • requestContent: String
      • responseContent: String
      • deferredTill: Date/Time
      • sla: Date/Time
      • created: Date/Time
      • startedOn: Date/Time
      • completedOn: Date/Time
      • lastStartedTime: Date/Time
    • status: String
    • message: String
    Start Process Action Triggers a specific bot process in RPA Hub and returns the status.
    • Process Name: Record
    • Robots: Array[String]

      Ignore an entry in this field if a robot pool is assigned to the bot process.

      When invoking the Start Process Workflow Studio action, the robots that are in the In Maintenance life-cycle stage status are treated as failed robots.

    • Action Status: Object
    • Result: String
    • Robots: Array[String]
    • Process: String
    • Failed Robots: Array[Object]
    Stop Process Action Stops a bot process. If Graceful Stop is enabled, this action gracefully stops the bot process.
    • Result: String
    • Action Status: Object
    • Robots: Array[String]
    • Process: String
    • Failed Robots: Array[Object]
    Unassign User from Attended Automation Process Action Unassigns the user from the attended automation process.
    • Process Name: Record
    • Username: Record
    • status: String
    • message: String
    • Action Status: Object
    Unassign User from Attended Robot Action Unassigns the user from the attended robot and retires the attended robot. Username: Record
    • Action Status: Object
    • Status: String
    • Message: String
    Update Process Parameter Action Updates the Value field for the process parameter.
    • Process: Record
    • Parameter Name: String
    • Value: String
    • status: String
    • Action Status: Object
    • message: String
    Update WorkItem Action Updates work queue items.
    • Queue Name: Record
    • WorkItemID: String
    • Stage: String
    • DefferedTill: Date/Time
    • Name: String
    • Priority: Choice
    • Status: Choice
    • Request Content: String
    • Type: String
    • Remarks: String
    • SLA: Date/Time
    • Response Content: String

    The maximum limit for Request Content and Response Content fields is 8000 characters.

    If the Is Work Item Name Sensitive check box on the associated work queue form is selected, the data in the Request Content field is encrypted. Sensitive data with encryption is stored in the work item, so that it can be passed to the RPA Desktop Design Studio or robots.

    • IsNameExist: True/False
    • Status: String
    • Message: String
    • Action Status: Object
    Verify HashCode of a Package Version Verifies the HashCode of a package version in RPA Hub to validate the HashCode of the manually uploaded automation zip file with the associated package version record.

    For more information about verifying the HashCode of a package version, see Verify the HashCode of a package version in RPA Hub.

    Package Version: Record
    • Action Status: Object
    • Message: String
    • isAttachmentValid: True/False

    RPA Hub subflow

    The following table shows the detailed description, action input, and action output of RPA Hub subflow.

    Table 2. RPA subflow
    Subflow Description Subflow inputs Subflow outputs
    Import Package Version Attachment Subflow Imports the package version attachments automatically for a package version. To automatically migrate the package attachment (automation zip file) from a lower (non-production) to a higher (production) environment.

    For more information about importing a package version attachment in RPA Hub, see Import a package version attachment in RPA Hub.

    • Email: Email
    • Package Version: Record

    After the attachment is uploaded successfully or if an error occurs while uploading the attachment, an email notification (if email is provided as an input) is sent to the user who performs this import attachment action.

    Start Process Subflow Triggers a specific bot process in RPA Hub. Returns process job details.
    • Process Name: Record
    • Robots: Array[String]

      Ignore an entry in this field if a robot pool is assigned to the bot process.

      If a process job is not in the Running status, the robot that is associated with the process job is treated as Failed in the Start Process subflow output.

    • Failed Robots: Array[Object]
    • Stopped Robots: Array[String]
    • Pending Robots: Array[String]
    • Process Jobs: Array[String]
    • Result: String
    • Message: String
    Stop Process Subflow Triggers a specific bot process to stop in RPA Hub. Returns robots details and process job status. If Graceful Stop is enabled, this subflow gracefully stops the bot process.
    • Graceful Stop: True/False
    • Process Name: Record
    • Robots: Array[String]
    • Failed Robots: Array[Object]
    • Stopped Robots: Array[String]
    • Pending Robots: Array[String]
    • Process Jobs: Array[String]
    • Message: String
    • Result: String