Skip To Content

添加和配置“运行 GP 服务”

“运行 GP 服务”步骤用于运行已配置地理处理服务。 可使用该步骤运行已作为服务发布至 ArcGIS Enterprise 门户的地理处理工具、Python 脚本工具和 模型构建器 模型。

运行步骤时,作业切片上将显示正在启动图标 Starting。 启动服务时,将显示正在运行图标 Running,表示地理处理服务正在运行。

如果使用 ArcGIS Arcade 表达式配置了任意步骤参数,则在地理处理服务开始运行之前,这些参数将转换为相应的值。

如果启用了在运行时可见选项,则可通过该步骤先定义参数值,然后再启动地理处理服务。 如果为参数定义了默认值,则这些值将在运行步骤时显示并且可以覆盖。 必需参数以红色高亮显示。

如果步骤运行成功,将显示步骤完成图标 Step Complete。 如果步骤失败,将显示 GP 步骤失败图标 Step Failed

注:

如果从 ArcGIS Arcade 表达式获取的参数值与地理处理服务不兼容,则步骤将失败。

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

  • 如果已启用在运行时可见选项,则可以提供参数值,然后可通过单击继续运行步骤。
  • 可通过单击取消步骤按钮 Cancel Step 取消步骤。
    注:

    在某些情况下,可能无法在该步骤开始运行之后将其取消。

  • 可通过单击完成步骤按钮 Complete Step 完成步骤。

配置步骤

To configure the step, do the following:

  1. Create or edit a workflow diagram to access the Step Library panel.
  2. 运行 GP 服务步骤库面板拖至工作流画布上步骤的连接箭头。

    The Step Details panel appears.

  3. Provide a name for the step in the Step Name text box.
  4. GP 服务 URL 文本框中键入地理处理服务的 URL。
  5. (可选)如果地理处理服务不受保护并且不需要在请求中提供令牌,则取消选中安全复选框。
  6. 参数部分中,单击编辑

    随即显示步骤参数对话框。

  7. 根据需要在参数值文本框中配置输入参数值。

    还可以将 ArcGIS Arcade 表达式用于参数值。 如果参数不支持字符串值,单击令牌按钮以使用 Arcade 表达式。

    提示:

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

  8. (可选)选中参数旁的运行时可见复选框以允许在 ArcGIS Pro 中运行步骤时设置参数值。
  9. 根据需要更新返回值。
  10. Click the Options tab.
  11. 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.
      注:

      If your workflow diagram is configured to automatically run a sequence of steps that includes the Evaluate Data Quality or the Run GP Service step, steps that attempt to run after the user token that started the sequence of steps expires will not run automatically. You must have a license for the ArcGIS Workflow Manager Server Advanced role to continue running the additional automated steps without manual intervention.

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

      Learn more about scheduling options

  12. Optionally, provide help text for the step in the Step Help text box.

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

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

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

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

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 valuesDescription

S000001

The step completed successfully.

F000001

The step failed to complete successfully.

输出值

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

输出名称值描述

<GeoprocessingServiceOutput>

返回从地理处理服务接收的所有输出值。

相关主题