Get Job Parent Version (Workflow Manager)

Summary

Gets the parent version of a job as an enterprise geodatabase connection file to be used for posting edits in a geoprocessing model to the correct parent version.

Usage

  • The Input Job ID must be for a job that currently exists in the repository. This job must have a data workspace already associated with it.

  • This tool is typically used in a model to retrieve the job's parent version. For example, a model can be created to reconcile and post edits made in a specific job version to the parent version. The Get Job Data Workspace tool would be utilized to retrieve the data workspace connection, whereas the job's version would be retrieved using the Get Job Version tool, and the parent version would be retrieved using the Get Job Parent Version tool.

  • This tool supports feature service data workspace in ArcGIS Pro. When the job has the feature service data workspace, the parent version is always sde.Default.

Syntax

arcpy.wmx.GetJobParentVersion(Input_JobID, {Input_DatabasePath})
ParameterExplanationData Type
Input_JobID

The ID for the job's parent version to be retrieved.

String
Input_DatabasePath
(Optional)

The Workflow Manager (Classic) database connection file that contains the job information. If no connection file is specified, the current default Workflow Manager (Classic) database in the project is used.

File

Derived Output

NameExplanationData Type
Output_JobParentVersion

The name of the job's parent version.

String

Code sample

GetJobParentVersion example (stand-alone script)

Retrieve the parent version of the selected job.

# Import arcpy module
import arcpy

# Check out any necessary licenses
arcpy.CheckOutExtension("JTX")

# Local variables:
Input_JobID = "1"
Input_DatabasePath = "C:\\Program Files\\WMX\\Database\\wmx.jtc"

# Process: Get Job Parent Version
arcpy.GetJobParentVersion_wmx(Input_JobID, Input_DatabasePath)

Environments

This tool does not use any geoprocessing environments.

Licensing information

  • Basic: No
  • Standard: Requires Workflow Manager
  • Advanced: Requires Workflow Manager

Related topics