Copy Extended Properties (Topographic Production)

Summary

Copies extended property values from one job to another job in the same Workflow Manager (Classic) repository.

Caution:

This tool is designed to be run as a step in a Workflow Manager (Classic) workflow. Running this tool outside of Workflow Manager (Classic) does not honor all Workflow Manager (Classic) constraints such as job assignment, dependencies, or holds and may cause a job to enter an unusable state.

Caution:

This tool is intended for use with the Topographic Mapping production workflows and will not support an improperly configured Workflow Manager (Classic) repository. Sample workflows and instructions for configuring Topographic Mapping production workflows are available as part of the product file installer.

Usage

  • This tool copies the selected extended properties in the identified properties table for the target job.

  • Populate the Properties Table Name parameter with the name of the table only. You don't need to populate the full database path to the table or the qualified name of the table.

  • The Properties Table Name value you specify must be registered as an extended property table in Workflow Manager (Classic).

  • The values for the chosen property fields will only be copied to the target job if the field is a valid extended property for both jobs.

Syntax

CopyExtendedProperties(source_job_id, target_job_id, property_table_name, property_fields, {database_path})
ParameterExplanationData Type
source_job_id

The Job ID of the Workflow Manager (Classic) job that contains the properties to copy.

Long
target_job_id

The Job ID of the target job that will have its properties updated.

Long
property_table_name

The name of the extended properties table that will be updated.

String
property_fields
[property_fields,...]

The properties to be copied from the source job to the target job.

String
database_path
(Optional)

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

File

Derived Output

NameExplanationData Type
updated_job_id

Returns the target job ID that has the updated properties.

Long

Code sample

CopyExtendedProperties example (stand-alone script)

This sample script copies properties from a child job to a parent job.

# Name: CopyExtendedProperties_sample.py
# Description: Sample script for running the Copy Extended Properties tool, to copy properties from
# a child job to a parent job

# Import System Modules
import arcpy

# Check Out Extensions
arcpy.CheckOutExtension('Foundation')
arcpy.CheckOutExtension('JTX')

# Setting the environment
arcpy.env.overwriteOutput = True

# Setting Local Variables
source_job_id = 2024
target_job_id = 2023
property_table_name = 'TOPO_PRODUCTION_PROPERTIES'
property_fields = 'current_job_data_path;current_job_data_type'
database_path = r'C:\Data\Workflows\Testing.jtc'

# Calling the Copy Extended Properties tool to copy properties from a child job to a parent job
arcpy.topographic.CopyExtendedProperties(source_job_id, target_job_id, property_table_name, property_fields, database_path)

# Getting all messages, warnings, and errors from the tool run and printing the results back to the user
messages = arcpy.GetMessages(0)
warnings = arcpy.GetMessages(1)
errors = arcpy.GetMessages(2)
arcpy.AddMessage('Tool Messages: {}\nTool Warnings: {}\nTool Errors{}\n'.format(messages, warnings, errors))

# Check In Extensions
arcpy.CheckInExtension('Foundation')
arcpy.CheckInExtension('JTX')

Environments

This tool does not use any geoprocessing environments.

Licensing information

  • Basic: No
  • Standard: Requires Production Mapping and Workflow Manager
  • Advanced: Requires Production Mapping and Workflow Manager

Related topics