Add and configure Run GP Service

The Run GP Service step runs a configured geoprocessing service. The step can be used to run geoprocessing tools, Python script tools, and ModelBuilder models that have been published to your ArcGIS organization as services.

When the step is run, the Starting icon Starting appears on the job tile. When the service starts, the Running icon Running appears to indicate that the geoprocessing service is running.

If any of the step parameters are configured with an ArcGIS Arcade expression, they are converted to the appropriate values before the geoprocessing service starts running.

If the Visible option is enabled, the step allows you to define parameter values before the geoprocessing service is started. If default values were configured for parameters, they appear when you run the step and can be overridden. Required parameters are highlighted in red.

If the step runs successfully, a Step Complete icon Step Complete appears. If the step fails, a GP Step Failed icon Step Failed appears.

Note:

If a parameter value obtained from an ArcGIS Arcade expression is incompatible with the geoprocessing service, the step fails.

When the step is run, the following actions can be performed:

  • If the Visible option is enabled, parameter values can be provided and the step can be run by clicking Proceed.
  • The step can be canceled by clicking Cancel Step Cancel Step.
    Note:

    In some cases, you may be unable to cancel this step after it starts running.

  • The step can be finished by clicking Complete Step Complete Step.

Configure the step

To configure the step, do the following:

  1. Create or edit a workflow diagram to access the Step Library panel.
  2. Drag Run GP Service from the Step Library panel to a connection arrow of a step on the workflow canvas.

    The Step Details panel appears.

  3. Provide a name for the step in the Step Name text box.
  4. Choose a geoprocessing service from the GP Service drop-down menu.
  5. If you don't have a geoprocessing service associated with the workflow diagram, add a geoprocessing service data reference:
    1. Click Add data reference from the drop-down menu.

      The Add data reference dialog box appears.

    2. Add a data reference by doing one of the following:
      • Browse for item—Browse and choose from a list of items on the current portal.
        Tip:

        You can refine results by applying filters and tags to the search.

      • Enter item ID manually—Choose the environment where the data reference is located and provide the item ID and reference name in the Item ID and Reference Name text boxes.

        If you chose Other, provide the URL to the ArcGIS organization that contains the data reference in the Portal URL text box. If you chose Standalone server for GP service, provide the service URL to the geoprocessing service that contains the tool you want to use.

        For example:

        https://machine.domain.com/webadaptor/rest/services/<GP Service Name>/GPServer

        The item is automatically validated by Workflow Manager and the data reference type is set in the Type bar.

        If the data reference cannot be validated, you must provide the item ID to a valid data reference that matches the set data reference type.

      Learn more about managing data references

    3. Click OK to save the data reference, or click Cancel to exit.
  6. If the geoprocessing service contains more than one tool, choose the tool that you want to run from the Tool drop-down menu.
  7. Click Edit in the Arguments section.

    The Step Arguments dialog box appears.

  8. Configure parameter values in the Parameter Value text boxes as necessary.

    To use ArcGIS Arcade expressions for parameter values, click the Change input type drop-down arrow and choose the input type for the associated Parameter Value text box. This option is not available for string values.

    Tip:

    Click This input supports Arcade Expressions This input supports Arcade expressions and choose an Arcade expression to add it to its associated text box.

  9. Optionally, check the Visible check box next to a parameter to allow its value to be set when the step is run in ArcGIS Pro.
  10. Update the return value as necessary.
  11. Click the Options tab.
  12. Configure Step Options as necessary:
    • Manual—Run the step manually.
      • Optional—Allow the step to be finished without being run.
    • Automatic—Run the step as soon as it becomes active.
      Note:

      If the workflow diagram is configured to automatically run a sequence of steps that includes the Run GP Service step, steps that attempt to run after the user token expires will not run automatically. The ArcGIS Workflow Manager Advanced organization extension is required to run additional automated steps without manual intervention.

    • Run on a Schedule—Run the step according to a set schedule.

      Learn more about scheduling options

  13. Optionally, choose one of the following options to configure help in the step:
    • None—Configure the step without step help.
    • Text—Configure help text for the step in the Text text box.

      You can use ArcGIS Arcade expressions to provide a dynamic value for the step help. If the step help contains plain text and Arcade expressions, format the text as follows:

      
      'For further assistance, please contact' + JobCreator($Job) + '.'

    • URL—Configure the step with a link to a help resource in the URL text box.
      Note:

      Steps that are run in the web app only support HTTP and HTTPS URL formats. Steps that are run in ArcGIS Pro support HTTP, HTTPS, and file formats.

      You can also use Arcade expressions to provide a dynamic value. If the URL contains plain text and Arcade expressions, format the text as follows:

      
      'https://pro.arcgis.com/en/pro-app/latest/tool-reference/' + JobExtendedProperty($Job, 'tools', 'toolbox') + '/' + jobExtendedProperty($job, 'tools', 'alias') + '.htm'

      Configure the Automatically Encode Arcade Result check box as follows:

      • If an Arcade expression returns special characters that must be escaped when converted to a URL, such as a space or a forward slash, ensure that the Automatically Encode Arcade Result check box is checked.
      • If an Arcade expression is used to form the base URL, uncheck the Automatically Encode Arcade Result check box.

  14. Optionally, click the Style tab to change the shape and color of the step.
  15. Optionally, click the About tab and provide a description for the step in the Step Description text box.
    Tip:

    The About tab also contains the step's ID that can be used with dynamic job properties to obtain a step's output. Click Copy Step ID Copy Step ID to copy the step ID to the clipboard.

Return value

When the step is completed, its return value is stored to indicate the result of the step. The return value can be immediately evaluated using paths to determine the next steps in the workflow. You can also retrieve the return value for completed steps throughout the workflow using ArcGIS Arcade expressions. The following table lists the step's return values:

Return valueDescription

S000001

The step completed successfully.

F000001

The step failed to complete successfully.

Output value

When the step is completed, its output value is stored and can be used to determine the path the workflow follows or can be used as inputs for other steps throughout the workflow. The following table lists the step's output value:

Output value nameDescription

<GeoprocessingServiceOutput>

Returns all output values received from the geoprocessing service.

Related topics