Skip To Content

添加和配置“定义位置”

“定义位置”步骤用于为作业识别需要执行工作的位置。 位置可以是现有要素服务中、ArcGIS Pro 工程中或 ArcGIS Workflow Manager Web 应用程序的 Web 地图中的点、线或面。

如果步骤在 Workflow Manager Web 应用程序中运行并且选择地图作为选择方法,作业切片中将显示在步骤中配置的 Web 地图。 如果为步骤配置了帮助文本,该文件将在作业切片的底部显示。 可选图层将在地图上显示,除作业位置图层之外的所有附加图层均为只读。 使用管理图层微件 Manage Layers 更改各个图层的可见性,使用绘制要素 Draw A Feature选择要素 Select Features 微件定义作业的位置。

注:

如果作业位置已定义,则无法对其进行编辑,但是可以通过绘制或选择新要素进行替换。

如果步骤在 ArcGIS Pro 中运行并且选择地图作为选择方法,则在 中运行步骤时作业位置图层将添加至在步骤中配置的地图,并且创建要素窗格将出现并显示作业位置图层。 如果为步骤配置了帮助文本,该文件将在作业切片的底部显示。 使用创建要素窗格定义作业的位置。

用于作业位置的几何类型基于在步骤中配置的几何类型。 定义作业位置时,考虑以下条件:

  • 只能将具有正确几何类型的要素另存为作业位置。
  • 如果选择了几何类型正确的多个面要素或多个线要素,则位置将另存为多部件要素。
  • Workflow Manager web 应用程序中绘制位置时,将移除任何现有选择,选择要素时,将移除绘制的位置。

如果选择地图作为选择方法,则可以在运行步骤时执行以下操作:

  • 可以定义作业位置。
  • The step can be cancelled by clicking Cancel.
  • The step can be finished by clicking Proceed.

如果选择 Arcade 作为选择方法,将在运行步骤时自动定义作业位置,并且将自动完成步骤。 如果 Arcade 表达式返回的几何为空或无效,步骤将失败。 如果 Arcade 表达式返回的几何类型与在步骤中配置的几何类型不一致,步骤将失败。

配置步骤

To configure the step, do the following:

  1. Create or edit a workflow diagram to access the Step Library panel.
  2. 定义位置步骤库面板拖至工作流画布上步骤的连接箭头。

    The Step Details panel appears.

  3. Provide a name for the step in the Step Name text box.
  4. Optionally, add the message you want to appear when the step is run in the User Prompt text box.

    You can also use the following example to display a dynamic value using ArcGIS Arcade expressions:

    'This job is currently assigned to ' + jobOwner($job) + '.'
  5. 单击几何类型下拉箭头,然后为作业位置选择几何选择类型。
  6. 选择以下选项之一:
    • 地图 - 允许用户定义作业在地图上的位置
    • 几何 - 以 Esri JSON 格式使用坐标自动定义作业位置
  7. 如果选择地图,执行以下步骤:
    1. 根据需要选择位置方法选项:
      • 选择 - 在地图上选择现有要素
      • 绘制 - 使用 ArcGIS Pro 中的绘制工具或 Workflow Manager Web 应用程序中微件创建要素
    2. 地图部分的 Web 地图下,单击添加添加要在 Workflow Manager Web 应用程序中使用的 Web 地图。

      随即显示定义位置步骤对话框。

      注:

      Web 地图无法用于在 ArcGIS Pro 中定义位置。 必须提供要在 ArcGIS Pro 工程中使用的地图的名称才能定义位置。

    3. 要指定 Web 地图所在的位置,选择以下选项之一:
      • 此 Enterprise - 添加在 Workflow Manager 所在门户上可用的 web 地图。
      • ArcGIS Online - 添加位于 ArcGIS Online 上的公共 Web 地图。
      • 其他 - 添加位于另一个门户上的公共 Web 地图。
    4. 如果选择其他,在门户 URL 文本框中键入包含 web 地图的门户的 URL,然后按 Enter 键。

      例如,https://webadaptorhost.domain.com/webadaptorname

    5. 项目 ID 文本框中键入 Web 地图的项目 ID。
    6. 引用名称文本框中,提供 Web 地图的名称。
    7. 单击确定

      步骤详细信息面板中将显示 Web 地图 URL。

      注:

      要编辑 Web 地图,可单击编辑,要进行删除,单击移除

    8. ArcGIS Pro 文本框中提供要在 ArcGIS Pro 工程中使用的地图的名称。
    9. (可选)如果为 Web 地图配置了启用搜索,在搜索文本文本框中提供定义查询、搜索文本或 Arcade 表达式,以在 Workflow Manager Web 应用程序中运行步骤时缩放至初始地图范围。
  8. 如果选择几何,按照以下示例以 Esri JSON 格式使用坐标定义作业位置。

    可使用字符串、Arcade 表达式或二者的组合定义位置。

    使用 JSON 字符串定义点位置。

    {"x" : -118.15, "y" : 33.80, "spatialReference" : {"wkid" : 4326}}

    使用 Arcade 表达式定义点位置。

    '{"x":' + jobOutputValue($job, '6d3a2e62-41f3-0ca5-d14a-bf87b8e4e4ec', 'testx') +', "y":' +jobOutputValue($job, '6d3a2e62-41f3-0ca5-d14a-bf87b8e4e4ec', 'testy') + ', "spatialReference" : {"wkid" : ' +jobOutputValue($job, '6d3a2e62-41f3-0ca5-d14a-bf87b8e4e4ec', 'wkid') + "}}"

    使用 Arcade 表达式定义点位置,该表达式用于将坐标从 GeoJSON 格式转换为 Esri JSON 格式。

    {geoJsonToEsriJson(jobExtendedProperty($job,
    'assets', 'geojson'), 'Point'),"spatialReference" : {"wkid" : 4326}}

    使用 shape 字段定义位置:

    jobExtendedProperty($job, '<table_name>','shape')
    注:

    shape 字段是用于从扩展属性表获取几何的字段的名称。

    默认空间参考为 Web 墨卡托辅助球体 (wkid 3857)。 如果 Arcade 表达式返回的几何具有其他空间参考,则将定义位置并将空间参考转换为 wkid 3857。

  9. Click the Options tab.
  10. 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

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

    You can also use the following example to display a dynamic value using ArcGIS Arcade expressions:

    'For further assistance, please contact ' + jobCreator($job) + '.'
  12. Optionally, click the Style tab to change the shape and color of the step.
  13. 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:

输出描述ArcGIS Arcade 表达式语法

<Location>

返回已定义的位置。

jobOutputValue($job, '<step_id>')

相关主题