Skip To Content

Update Property Count

Summary

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

Caution:

This tool is designed to be run as a step in a Workflow Manager workflow. Running this tool outside of Workflow Manager does not honor all Workflow Manager 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 repository. Sample workflows and instructions for configuring Topographic Mapping production workflows are available as part of the product files for Esri Production Mapping.

Usage

  • 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.

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

Syntax

UpdatePropertyCount_topographic (job_id, properties_table_name, property_field, update_value, {database_path})
ParameterExplanationData Type
job_id

The ID of the Workflow Manager 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
(Optional)

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

File

Derived Output

NameExplanationData Type
updated_job_id

The ID of the updated Workflow Manager job.

Long

Code sample

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

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

Environments

This tool does not use any geoprocessing environments.

Licensing information

  • Basic: No
  • Standard: Requires Production Mapping
  • Advanced: Requires Production Mapping

Related topics