REST Message legacy workflow activity

  • Release version: Washingtondc
  • Updated February 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 REST Message legacy workflow activity

    The REST Message legacy workflow activity allows administrators to override REST endpoints or supply variables configured in the REST Message module. As of the Washington DC release, this activity is deprecated and will not appear in the Workflow canvas for new developments. Existing workflows using this activity will continue to function, but editing will require re-activation.

    Show full answer Show less

    Key Features

    • Functionality: Executes REST functions (POST, PUT, GET, DELETE) using values defined in the function record.
    • MID Server Support: Option to use a MID Server for sending messages, ideal for accessing endpoints within firewalls or sub-networks.
    • Input Variables:
      • Rest Message: Reference to the desired REST message.
      • REST Message Function: HTTP method to call (put, post, get, delete).
      • REST Endpoint: Custom endpoint override if needed.
      • Rest Message Variables: Variables for substitution in outbound messages, formatted as name=value.
      • Rest Message MID Server: Option to check if a MID Server should be used.
      • Rest Message Script Sensor: Script executed after a response is received, allowing access to the response body via activity.output.

    Key Outcomes

    By utilizing the REST Message legacy workflow activity, customers can maintain existing workflows while transitioning to new Orchestration REST Activity templates for future developments. Understanding the input variables and their usage is crucial for effective customization and integration in your ServiceNow environment.

    The legacy REST Message activity enables an administrator to override the REST endpoint or supply the variables configured in the REST Message module.

    This activity is deprecated in the Washington DC release and no longer shows up in the Workflow canvas for new workflow development. New workflows should use the Orchestration REST Activity templates instead.

    Existing workflows using it will continue to work as designed. To edit this activity in an existing workflow, you must re-activate the activity.

    The REST Message activity executes a dead link REST function (POST, PUT, GET, or DELETE) on an endpoint using values defined in the function record.

    Note:
    If you want to use a MID Server to send the REST message, the MID Server must be accessible by the instance and configured to use SSH.

    Input variables

    Table 1. REST Message activity input variables
    Field Description
    Rest Message
    REST Message Name of the Create a REST message to run. This is a reference field to the REST Message [sys_rest_message] table (System Web Services > Outbound > REST Message).
    REST Message Function Function to call that is defined in a REST message function. This is a reference field to the HTTP Method [sys_rest_message_fn] table (System Web Services > Outbound > REST Message).

    Available functions are put, post, get, or delete. You can edit functions in the HTTP Methods related list in each REST Message record.

    REST Endpoint REST endpoint to use instead of the Endpoint defined in the HTTP Method record. Leave this field blank to use the defined endpoint in the REST Message Function record.
    Rest Message Variables
    Variables Values to use for Variable substitution in outbound REST messages defined in the HTTP Method record.
    Use the following format for the string:
    name1=value1, name2=value2, . . .
    For example, use name=${nameValue}, id=${idValue} where name and id are function variables. If either the variable name or value contains a comma or equal sign, escape those characters with a backslash.
    Rest Message MID Server
    Use MID Server Check this box if you want to use a MID Server to send the REST message. A MID Server might be necessary to reach an endpoint within a firewall or a subnetwork that is not visible from the instance. If this check box is selected, but no MID Server is defined in the MID Server field, the workflow automatically attempts to find a MID Server based on IP range and the REST capability.
    MID Server Name of the MID Server to use. This field is available when Use MID Server is selected. The workflow ignores this parameter if the use_midserver parameter is disabled.
    Rest Message Script
    Sensor Script The script to execute after the request has been made and a response has been received. You can access the full response body from the activity.output variable.