Use ArcGIS Arcade expressions to dynamically populate input values throughout a workflow. For example, you can use an Arcade expression to assign steps to specific users or groups based on the result of a step or send notification emails that contain job-specific information. You can also configure the Run GP Service step to use the JobLocation Arcade expression as an input parameter that's replaced with the extent of the job's location when the step is run. Every input value that supports Arcade expressions appears with the This input supports Arcade Expressions context menu that contains a list of expressions that can be added to its associated text box.
Use nested Arcade expressions to modify the output of other expressions. For example, use the following Text and Date functions to convert the output of the JobDueDate expression from epoch time to a more readable date format:
Text(Date(JobDueDate($Job)), 'dddd, MMMM D, Y')
To combine plain text and Arcade expressions, format the text as follows:
'Plain text' + ArcadeExpression() + 'plain text'
The following table contains an overview of the different categories of Arcade expressions specific to Workflow Manager:
Category | Description |
---|---|
Retrieve job information managed by ArcGIS Workflow Manager. | |
Retrieve custom business-specific information from extended properties tables. | |
Retrieve job data source and version information. | |
Retrieve job location information. | |
Retrieve user-defined settings. | |
Retrieve output values and past step assignment information. |
A complete list of Arcade functions and global variables can be found on the ArcGIS Developer site. The This input supports Arcade Expressions context menu contains the following expressions from the Arcade Function Index list:
Name | Arcade Expression | Description |
---|---|---|
Current Portal | $currentPortal | Returns the current active portal. |
Current User Details | var u = GetUser($currentPortal); return u['<key 1>'] + u['<key 2>'] | Returns properties of the current user. |
Current User Email | GetUser($currentPortal)['email'] | Returns the current user's email address. |
Current User ID | GetUser($currentPortal)['id'] | Returns the current user's ID. |
Current Username | $currentUser | Returns the current user's username. |
Get User Details | var u = GetUser($currentPortal, '<username>'); return u['<key1>'] + u['<key2>'] | Returns properties of a specified user. |
Get User Email | GetUser($currentPortal, '<username>')['email'] | Returns a specified user's email address. |
Get Username | GetUser($currentPortal, '<username>')['username'] | Returns a specified user's username. |
User Groups | userGroups($currentUser) | Returns the ArcGIS organization group IDs for the current user. |