ArcGIS Arcade expressions allow you to create placeholders for dynamic properties in job templates and the steps and paths in your workflow diagrams. For example, the Run GP Service step can be configured to use the jobLocation($job) Arcade expression as an input parameter that's replaced with the job's location when the step is run.
Tip:
You can also use the Arcade Date and Text functions to convert the output of an Arcade expression to a string and optionally change its format. For example, the Text(Date(jobEndDate($job)), 'dddd, MMMM D, Y') Arcade expression converts the job's end date from 1589414631 (epoch) to Thursday, May 14, 2020.
The following is a list of ArcGIS Workflow Manager components that support ArcGIS Arcade expressions:
- Job templates
- Paths
- Step templates
The following table contains a list of ArcGIS Arcade expressions that can be used in Workflow Manager:
Arcade expression | Description | Example input | Example output |
---|---|---|---|
$currentUser | Returns the full name of the current user | $currentUser | John Doe |
userGroups($currentUser) | Returns the ArcGIS Enterprise portal group IDs for the current user | userGroups($currentUser) |
abcde12345 |
$job | Returns the job ID for the current job | $job | RRpFaSk1QK2IIHZTJX4flQ |
jobVersion($job, <DatasourceName>) | Active job version | jobVersion($job, 'Gas_Utility_Network') | jdoe.JOB_1 |
jobType($job) | Job template name | jobType($job) | Data_edits |
jobStatus($job) | Job status | jobStatus($job) | Ready to work |
jobStartedDate($job) | Job start date in epoch format | jobStartedDate($job) | 1589414631 |
jobEndDate($job) | Job closed date in epoch format | jobEndDate($job) | 1589414631 |
jobDescription($job) | Job description | jobDescription($job) | This is a landbase editing job |
jobPriority($job) | Job priority (high, medium, or low) | jobPriority($job) | Low |
jobName($job) | Job name | jobName($job) | JOB_1 |
lastRunner($job, <StepId>) | User name of the person who last ran the step | lastRunner($job, 'f50d740d-cc04-9296-4ce3-181e82604465') | jdoe |
jobCreator($job) | User name of the person who created the job | jobCreator($job) | jdoe |
jobOwner($job) | User name of the person who owns the job | jobOwner($job) | jdoe |
jobLocation($job) | Location defined for the job in MinX, MinY, MaxX, MaxY, WKID format | 'https://<WebAdaptorHost.Domain.com>/<PortalWebAdaptorName>/apps/webappviewer/index.html?extent=' + jobLocation($job) | 9862243.197380835,5108823.353604797,-9801843.791879544,5133768.0805264525,3857 |
jobExtendedProperty($job, <table>, <field>) | Value of an extended property for the job | jobExtendedProperty($job, 'purchase_order', 'date') | 1589414631 |
jobRelatedProperty($job, <table>, <field>, <rowId>) | Value of a related property for the job Note:The rowId parameter is an optional parameter. The most recent record is returned by default. | jobRelatedProperty($job, 'Redlands', 'Population', '8fGjVNvzSjGYRpDoSDfSdA') | 71198 |
jobOutputValue($job, <stepId>, <valueName>) | The step output value for a completed step valueName is an optional parameter | jobOutputValue($job, 'd27395ec-ddfe-2b11-777a-6df02e86d835', 'num_acres') | 123 |