The Define Location step identifies where work needs to be performed for a job. The location can be a point, line, or polygon in an existing feature service, an ArcGIS Pro project, or in a web map in the ArcGIS Workflow Manager web app.
If the step is run in the Workflow Manager web app and Map is chosen as the location method, the web map configured in the step appears in the job tile. When the step is configured with step help, it appears at the bottom of the job tile. Selectable layers appear on the map, and all additional layers, except the Job Location layer, are read-only. Use the Manage Layers widget to change the visibility of individual layers and use the Draw A Feature
or Select Features
widget to define the location for the job.
Note:
If the job's location is already defined, it can't be edited, but it can be replaced by drawing or selecting new features.
If the step is run in ArcGIS Pro and Map is chosen as the location method, the Job Location layer is added to the map configured in the step when the step is run and the Create Features pane appears with the Job Location layer. When the step is configured with step help, it appears at the bottom of the job tile. Use the Create Features pane to define the location for the job.
The type of geometry used for the job's location is based on the geometry type configured in the step. Consider the following conditions when defining a job's location:
- Only features with polygon, polyline, or multipoint geometry types can be saved as the job's location. Curve geometries are not supported.
- Circle, Ellipse, Stream, Freehand, and Autocomplete Freehand polyline and polygon construction tools cannot be used to define the job's location.
- If more than one polygon or multiple line features of the correct geometry type are selected, the location is saved as a multipart feature.
- Drawing a location in the Workflow Manager web app removes any existing selections and selecting features removes drawn locations.
If Map is chosen as the location method, the following actions can be performed when the step is run:
- The job's location can be defined.
- The step can be canceled by clicking Cancel.
- The step can be finished by clicking Proceed.
If Geometry is chosen as the location method, the job's location is automatically defined when the step is run and the step completes automatically. If the geometry returned by an ArcGIS Arcade expression is null or invalid, the step fails. If the geometry type returns an Arcade expression that doesn't match the geometry type configured in the step, the step fails.
Configure the step
To configure the step, do the following:
- Create or edit a workflow diagram to access the Step Library panel.
- Drag Define Location from the Step Library panel to a connection arrow of a step on the workflow canvas.
The Step Details panel appears.
- Provide a name for the step in the Step Name text box.
- Optionally, add the message that you want to appear when the step is run in the User Prompt text box.
If the user prompt contains plain text and ArcGIS Arcade expressions, format the text as follows:
'This job is currently assigned to ' + JobOwner($Job) + '.'
Tip:
Click This input supports Arcade Expressions
and choose an Arcade expression to add it to its associated text box.
- Click the Geometry Type drop-down arrow and choose a geometry selection type for the job location.
You can also use ArcGIS Arcade expressions to provide a dynamic value.
- Choose one of the following options:
- Map—Allow a user to define the job's location on a map.
- Geometry—Predefine the job's location using coordinates in Esri JSON format.
- If you chose Map, complete the following to add a map:
- Check the Selection Method options as necessary:
- Select—Select existing features on the map.
- Draw—Create features with the drawing tools in ArcGIS Pro or the widgets in the Workflow Manager web app.
- Choose a web map from the Web Map drop-down menu.
- If you don't have a web map data reference associated with your workflow diagram, click Add Data Reference.
The Add data reference dialog box appears.
- 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.
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.
- Browse for item—Browse and choose from a list of items on the current portal.
- Click OK to save the data reference or click Cancel to exit.
You can delete the web map data reference by clicking X.
- Choose an ArcGIS Pro map from the ArcGIS Pro drop-down menu.
- If you don't have an ArcGIS Pro map data reference associated with your workflow diagram, click Add ArcGIS Pro Data Reference.
The Add ArcGIS Pro data reference dialog box appears with the Pro Item Type box set to Map.
- Provide the name of the ArcGIS Pro map data reference in the Pro Item Name text box.
- Click OK to save the data reference or click Cancel to exit.
You can delete the ArcGIS Pro map data reference by clicking X.
- Optionally, if Enable Search is configured for your web map, provide a definition query, search text, or an Arcade expression in the Search Text text box to zoom to an initial map extent when the step is run in the Workflow Manager web app.
- Check the Selection Method options as necessary:
- If you chose Geometry, use the following examples to define the job's location using coordinates in Esri JSON format.
You can use a string, an Arcade expression, or a combination of the two to define the location.
Define a point location using a JSON string.
{"x" : -118.15, "y" : 33.80, "spatialReference" : {"wkid" : 4326}}
Define a point location using an Arcade expression.
'{"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') + "}}"
Define a point location using an Arcade expression that converts coordinates in GeoJSON to Esri JSON format.
{GeoJsonToEsriJson(JobExtendedProperty($Job, 'assets', 'geojson'), 'Point'), "spatialReference" : {"wkid" : 4326}}
Define a location using the shape field.
JobExtendedProperty($Job, '<table_name>', 'shape')
Note:
The shape field is the name of the field used for obtaining the geometry from an extended properties table.
The default spatial reference is Web Mercator Auxiliary Sphere (wkid 3857). If the geometry returned by the Arcade expression has a different spatial reference, the location is defined and the spatial reference is converted to wkid 3857.
- Click the Options tab.
- 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.
- Manual—Run the step manually.
- 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.
- Optionally, click the Style tab to change the shape and color of the step.
- 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
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 value | Description |
---|---|
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 | Description |
---|---|
<Location> | Returns the location that was defined. |