Runtime Phase of the Embedded Task Automation

  • Release version: Xanadu
  • Updated August 1, 2024
  • 2 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 Runtime Phase of the Embedded Task Automation

    This content explains how ServiceNow customers can trigger and manage attended automations directly from ServiceNow forms using Embedded Task Automation. It details the user interaction, system checks, authentication, and data exchange processes involved during the runtime phase of an attended automation.

    Show full answer Show less

    Workflow of the Runtime Phase

    • A user with the RPA Assisted User role logs into ServiceNow and navigates to the relevant form where automation is to be triggered.
    • The user selects a form action, configured as part of the attended automation setup.
    • If the form has unsaved changes, a confirmation prompt ensures the user saves the form before proceeding.
    • Upon confirmation, the automation trigger initiates; if canceled, no action occurs.
    • The system attempts to start the attended automation by connecting to the Attended Robot installed on the user’s machine. If the connection fails, an informative message advises retrying or contacting a system administrator.
    • A URL is generated containing essential parameters such as OAuth Entity ID, code challenge, ServiceNow form record SysID, Bot Process Sys ID, and Package SysID to initiate the Attended Robot.
    • The Attended Robot uses these parameters to obtain OAuth access and refresh tokens, enabling authentication and secure execution.
    • The Attended Robot shares session details back with the ServiceNow form and begins automation execution.
    • During execution, the GetProcessFieldParameters component reads form field values via GraphQL API calls to ServiceNow, providing dynamic process parameters to the automation.
    • After automation completes, the SetProcessFieldParameters component updates form fields in ServiceNow with any changes, again using GraphQL API calls.

    Key Considerations for ServiceNow Customers

    • Ensure the Attended Robot is installed and accessible on user machines to successfully launch automations.
    • Form actions triggering automation must be properly configured and activated in the attended automation setup.
    • Users must save any form changes before triggering automation to avoid data loss or inconsistencies.
    • Authentication leverages OAuth tokens exchanged between ServiceNow and the Attended Robot for secure execution.
    • GraphQL APIs facilitate real-time data exchange between the ServiceNow form fields and the automation process, enabling dynamic input and output handling.
    • Failure to establish a connection to the Attended Robot will prevent automation execution, with guidance provided to the user.

    Learn more about the triggering of an attended automation from a ServiceNow form.

    Workflow of the Runtime Phase of an Embedded Task Automation

    Familiarize yourself with Embedded Task Automation concepts. For more information, see Embedded Task Automation in RPA Hub.

    A user with RPA Assisted User role logs into the ServiceNow instance.

    Navigates to the corresponding ServiceNow form from where the automation must be triggered.

    The user selects the form action, that is created when you activate the attended configuration.
    • If any changes are made on the ServiceNow form, a confirmation message is displayed to save before triggering the UI Action. If the user selects Proceed or OK, the form is saved. The automation is triggered. If the user selects Cancel, the automation is not triggered and the ServiceNow form is not saved.
    • When the user selects the UI action, if it is successful, an attempt is made to start attended automation. Make sure that the Attended Robot is installed on the machine. If it is not successful, a connection to initiate the Attended Robot is not established. An information message is displayed to try again or contact system administrator.

    A URL is generated that initiates the Attended Robot with details such as OAuth Entity ID, code challenge, ServiceNow form record SysID (from where the automation is triggered), Bot Process Sys ID, and Package SysID (Automation SysID).

    Using these details, the Attended Robot makes a call to the OAuth to get the access and refresh token. Learn about the authentication journey in the Attended Robot application and the automation execution. For more information, see Attended Robot authentication journey and automation execution in Embedded Task Automation.

    With these token details, the Attended Robot shares the session details with the ServiceNow form and starts executing the automation.

    The GetProcessFieldParameters component makes a GraphQL API to the ServiceNow instance to read the form field values that are mapped to the dynamic process field parameters. For more information about the GetProcessFieldParameters component, see Use the GetProcessFieldParameters component.

    After the automation is executed, the data is passed to the downstream applications.

    The SetProcessFieldParameters component makes a GraphQL API to the ServiceNow instance to set the form field values that are mapped to the dynamic process field parameters. For more information about the SetProcessFieldParameters component, see Use the SetProcessFieldParameters component.

    Figure 1. Workflow of the Runtime Phase of an Embedded Task Automation
    Workflow of the Runtime Phase of an Embedded Task Automation.

    Launch attended automations from ServiceNow forms

    Learn about the restrictions to launch an attended automation from ServiceNow forms and launching the attended automations. For more information, see Attended Robot authentication journey and automation execution in Embedded Task Automation.