Add and configure Define Location
Available with Workflow Manager license.
The Define Location step identifies where you need to perform work for a job. Defining job locations can help manage jobs and monitor the status of work. Many step templates also allow you to determine assignment and to control data editing based on job locations. You can also use job locations as dynamic job properties throughout your workflows to support location-based analysis and data management. The location can be a point, line, or polygon in an existing feature service, in an ArcGIS Pro project, or in a web map in the ArcGIS Workflow Manager web app.
If you chose Map for Location Method when configuring the step, the web map appears in the job tile when the step runs in the Workflow Manager web app. If you configured step help, the step help appears at the bottom of the job tile below the map. Selectable layers appear on the map, and all additional layers, except the Job Location layer, are read-only. You can use Manage Layers
to change the visibility of individual layers. You can also define the job's location using Draw a feature
, or Select features
if there are existing features at the location.
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.
When you use the selection tool, previously selected features become deselected, and previously unselected features become selected.
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, the step help appears at the bottom of the job tile below the map. 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 you chose Map as the location method, you can perform the following actions when the step runs:
Define the job's location.
Click Cancel to cancel the step.
Click Proceed to finish the step.
If you chose Geometry as the location method, the job's location is defined automatically when the step runs, and the step completes. 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.
Learn more about adding steps to a workflow diagram
The Step Details panel appears.
Provide a name for the step in the Step Name text box.
Optionally, in the User Prompt text box, add the message that you want to appear when the step runs.
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.
Workflow Manager automatically validates the item and sets the data reference type.
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.
Click OK to save the data reference or click Cancel to exit.
You can delete the web map data reference by clicking Delete
.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 Delete
.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.
Workflow Manager uses the configured search text to search the web map. For example, if
JobExtendedProperty($Job, 'request', 'address')evaluates to380 New York Street, Redlands, CA, the map searches for and zooms to that location when the Define Location step runs.
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
shapefield.JobExtendedProperty($Job, '<table_name>', 'shape')Note:
The
shapefield 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 Evaluate Data Quality or the Run GP Service step, steps that attempt to run after the user token expires do not run automatically. You need the ArcGIS Workflow Manager Server Advanced role to run additional automated steps without manual intervention.
Run on a Schedule—Run the step according to a set schedule.
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, contact ' + JobCreator($Job) + '.'URL—Configure the step with a link to a help resource in the URL text box.
Note:
Steps that run in the web app support only HTTP and HTTPS URL formats. Steps that 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, check the Automatically Encode Arcade Result check box.
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, which you can use 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 completes, Workflow Manager stores its return value to indicate the result of the step. You can immediately evaluate the return value 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 completes, Workflow Manager stores its output value, which you can use to determine the path the workflow follows or 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. |