Set Production Properties (Topographic Production)

描述

Updates the production properties extended properties table of a Workflow Manager (Classic) job based on its production type to ensure that the job and any associated tasks use the correct data and maps.

警告:

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.

警告:

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.

使用方法

  • In Topographic Mapping production workflows, a production type defines the database and maps that will be used to perform a type of production work such as MGCP data extraction or TM50 cartography.

  • This tool requires that the PRODUCTION_TYPE extended property is configured with a valid production type. Production types are defined by your Workflow Manager (Classic) administrator as part of configuring the Topographic Mapping production workflows.

  • The tool ensures that other workflow steps, such as Open Map, use the appropriate map as defined by the production type.

  • This tool creates and assembles a job directory containing all the files that will be needed to complete the Workflow Manager (Classic) job. The job directory is created by:

    • Creating a new folder with the job name in the path specified in the SHARED_ROOT_PATH extended property.
    • If PRODUCT_FILE_PATH is defined for the production type, all files from this path are copied to the job directory.
    • Creating a new folder in the job directory named Geodatabases.
      • If SCHEMA_DATABASE_NAME is defined for the production type, the first geodatabase with this name found in the job directory will be moved to the Geodatabases folder. The database will be renamed to the job name.
      • If SCHEMA_DATABASE_NAME is not defined for the production type, a new file geodatabase will be created in the Geodatabases folder with the name of the job.
      • A file geodatabase named ReviewerWorkspace_Job_<job_ID> will be created in the Geodatabases folder. This database will have the schema required for storing Data Reviewer records.
    • Creating a new folder in the job directory named Maps.
      • Finds the first .mxd, .mapx, or .pagx file with the name defined as the ITEM_NAME for the production type. The file is moved to the Maps folder and renamed to the job name.

语法

SetProductionProperties(job_id, {database_path})
参数说明数据类型
job_id

The ID of the Workflow Manager (Classic) job that will be updated.

Long
database_path
(可选)

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

派生输出

名称说明数据类型
updated_job_id

The ID of the updated Workflow Manager (Classic) job.

Long

代码示例

SetProductionProperties example (stand-alone script)

This script locates the record in the Topographic_Production_Type table that has the same Production Type Name as the job number and copies the Data Source Name, Portal Item Name, and Portal Item URL values to the Topographic_Production_Properties table.

# Name: SetProductionProperties_sample.py
# Description: Locates the record in the Topographic_Production_Type table that has the same Production Type Name as the job
# and copies the Data Source Name, Portal Item Name, and Portal Item URL values to the Topographic_Production_Properties table.

# Import System Modules
import arcpy

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

# Setting the environment
arcpy.env.overwriteOutput = True

# Setting Local Variables
job_id = 646
database_path = r"C:\Data\Workflows\Testing.jtc"

# Calling the Set Production Properties tool to set production property values for the job
arcpy.topographic.SetProductionProperties(job_id, 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('DataReviewer')
arcpy.CheckInExtension('JTX')

环境

此工具不使用任何地理处理环境。

许可信息

  • Basic: 否
  • Standard: 需要 Production Mapping and Data Reviewer and Workflow Manager
  • Advanced: 需要 Production Mapping and Data Reviewer and Workflow Manager

相关主题