Update Property Count (Topographic Production)

描述

Increases the value in an extended property by the update value each time the tool is executed so that metrics are recorded.

旧版本:

This tool has been replaced by the Update Extended Property tool. and will be deprecated in the next release.

警告:

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.

使用方法

  • This tool updates the selected extended property in the identified properties table for the selected job.

  • This tool is intended to support the tracking of various job metrics that are derived from the execution of workflow steps. One such metric is tracking the number of times a job goes back for rework.

  • 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 table designated in the Properties Table Name parameter must be registered as an extended property table in Workflow Manager (Classic).

  • The value (field) of the Property Field parameter must be an Integer field.

语法

UpdatePropertyCount(job_id, properties_table_name, property_field, update_value, {database_path})
参数说明数据类型
job_id

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

Long
properties_table_name

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

String
property_field

The property to be updated in the selected extended properties table.

String
update_value

The value by which the selected extended property will be increased.

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

代码示例

UpdatePropertyCount example (stand-alone script)

This sample script uses the UpdatePropertyCount tool to increase the rework_count field in the TOPO_PRODUCTION_PROPERTIES table by 1.

# Name: UpdatePropertyCount_sample.py
# Description: Sample script for running the Update Property Count tool, and increasing the rework_count field in the
# TOPO_PRODUCTION_PROPERTIES table by 1

# Import System Modules
import arcpy

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

# Setting the environment
arcpy.env.overwriteOutput = True

# Setting Local Variables
job_id = 15
property_table = 'TOPO_PRODUCTION_PROPERTIES'
property_field = 'rework_count'
update_value = 1
input_database_connection = r'C:\Data\Workflows\Testing.jtc'

# Calling the Update Property Count tool to increase the value in the rework_count field by 1
arcpy.topographic.UpdatePropertyCount(job_id, property_table, property_field, input_database_connection)

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

环境

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

许可信息

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

相关主题