Copy Extended Properties (Topographic Production)

Zusammenfassung

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

Vorsicht:

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.

Vorsicht:

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.

Verwendung

  • 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})
ParameterErklärungDatentyp
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

Abgeleitete Ausgabe

NameErklärungDatentyp
updated_job_id

Returns the target job ID that has the updated properties.

Long

Codebeispiel

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')

Umgebungen

Dieses Werkzeug verwendet keine Geoverarbeitungsumgebungen.

Lizenzinformationen

  • Basic: Nein
  • Standard: Erfordert Production Mapping and Workflow Manager
  • Advanced: Erfordert Production Mapping and Workflow Manager

Verwandte Themen