Data management functions

The following sections contain ArcGIS Arcade expressions that allow you to retrieve job data source and version information managed by ArcGIS Workflow Manager. These expressions are typically used in data editing workflows that involve the creation and management of branch versions.

JobDataSource

The JobDataSource expression returns the data source URL of the specified job's workflow diagram if it contains a data source and a version of the data source has been created for the specified job.

Parameters

JobDataSource(job_id, data_source_name)

NameExplanationData type

job_id

The ID of the job.

String

data_source_name

The name of the data source configured in the job's workflow diagram.

String

Output

Returns a string value of the data source URL of the specified job's workflow diagram if it contains a data source and a version of the data source has been created for the specified job.

Expression sample

The following expression returns the data source URL of the current job's workflow diagram:

JobDataSource($Job, 'Utility_Network_Data')
Example output
https://portal.domain.com/server/rest/services/UtilityNetwork_Data/FeatureServer

JobDataSourceArray

The JobDataSourceArray expression returns all of the data source URLs for the specified job's workflow diagram.

Parameters

JobDataSourceArray(job_id)

NameExplanationData type

job_id

The ID of the job.

String

Output

Returns an array of string values of all of the data source URLs for the specified job's workflow diagram.

Expression sample

The following expression returns the data source URLs for the current job's workflow diagram:

JobDataSourceArray($Job)
Example output
['https://portal.domain.com/server/rest/services/Utility_Network_Data/FeatureServer', 'https://portal.domain.com/server/rest/services/Parcel_Fabric_Data/FeatureServer']

JobVersionDetails

The JobVersionDetails expression returns the active version details of the specified data source.

Parameters

JobVersionDetails(job_id, data_source_name)

NameExplanationData type

job_id

The ID of the job.

String

data_source_name

The name of the data source configured in the job's workflow diagram.

String

Output

Returns the active version details for the specified data source.

Expression sample

The following expression returns the current job's active version details for the Gas_Utility_Network data source:

JobVersionDetails($Job,'Gas_Utility_Network')
Example output
{
   "replicaId":"<replica ID>",
   "replicaName":"<replica name>",
   "replicaLocation":"<replica location>",
   "name":"<version name>",
   "versionId":"<version ID>",
   "url":"<URL>",
   "privateUrl":"<privateURL>",
   "layerItemId":"<Layer Item ID>"
}

JobVersionDetailsArray

The JobVersionDetailsArray expression returns the version details of each data source in the order in which they are defined in the job's workflow diagram.

Parameters

JobVersionDetails(job_id)

NameExplanationData type

job_id

The ID of the job.

String

Output

Returns a JSON object array for each data source in the order in which they are defined in the job's workflow diagram.

Expression sample

The following expression returns all of the version details for the current job's data sources:

JobVersionDetailsArray($Job)
Example output
[
   {
      "replicaId":"<replica ID 1>",
      "replicaName":"<replica name 1>",
      "replicaLocation":"<replica location 1>",
      "name":"<version name 1>",
      "versionId":"<version ID 1>",
      "url":"<URL 1>",
      "privateUrl":"<privateURL 1>",
      "layerItemId":"<layer item ID 1>"
   },
   {
      "replicaId":"<replica ID 2>",
      "replicaName":"<replica name 2>",
      "replicaLocation":"<replica location 2>",
      "name":"<version name 2>",
      "versionId":"<version ID 2>",
      "url":"<URL 2>",
      "privateUrl":"<privateURL 2>",
      "layerItemId":"<layer item ID 2>"
   }
]

JobVersionGuid

The JobVersionGuid expression returns the GUID of the active version for the job's specified data source.

Parameters

JobVersionGuid(job_id, data_source_name)

NameExplanationData type

job_id

The ID of the job.

String

data_source_name

The name of the data source configured in the job's workflow diagram.

String

Output

Returns a string value of the GUID of the active version for the job's specified data source.

Expression sample

The following expression returns the GUID of the active version for the current job's Gas_Utility_Network data source:

JobVersionGuid($Job,'Gas_Utility_Network')
Example output
4C190A55-DE4B-4C1D-A40F-918FC7C6766A

JobVersionGuidArray

The JobVersionGuidArray expression returns all of the active data source version GUIDs for the specified job.

Parameters

JobVersionGuidArray(job_id)

NameExplanationData type

job_id

The ID of the job.

String

Output

Returns an array of string values that contains the active data source version GUIDs for the specified job.

Expression sample

The following expression returns all of the data source version GUIDs for the current job:

JobVersionGuidArray($Job)
Example output
['4C190A55-DE4B-4C1D-A40F-918FC7C6766A', '4C190A55-DE4B-4C1D-A40F-918FC7C6766A']

JobVersion

The JobVersion expression returns the name of the specified data source's active version for the specified job.

Parameters

JobVersion(job_id, data_source_name)

NameExplanationData type

job_id

The ID of the job.

String

data_source_name

The name of the data source configured in the job's workflow diagram.

String

Output

Returns the name of the specified data source's active version for the specified job.

Expression sample

The following expression returns the current job's active version name for the Gas_Utility_Network data source:

JobVersion($Job, 'Gas_Utility_Network')
Example output
jdoe.JOB_123

JobVersionArray

The JobVersionArray expression returns the names of all of the specified job's data sources in the order in which they are defined in the workflow diagram.

Parameters

JobVersionArray(job_id)

NameExplanationData type

job_id

The ID of the job.

String

Output

Returns an array of string values that contains the names of all of the specified job's data source versions in the order in which they are defined in the workflow diagram.

Expression sample

The following expression returns the names of all of the current job's data source versions:

JobVersionArray($Job)
Example output
['jdoe.JOB_1', 'jdoe.JOB_1']

Related topics