Update Task Group Metrics (Topographic Production)

描述

Updates and summarizes task group metrics that are part of the standard Topographic Workflow deployment of Workflow Manager (Classic).

警告:

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 summarizes information from the jobs into metrics that track workflow performance based on individual tasks and resources. These metrics are stored in the TOPO_COMPLEXITY, TOPO_METRICS_BY_TASK, and TOPO_METRICS_BY_RESOURCE property tables.

  • When this tool is run through Workflow Manager (Classic), a parent job is created for a task group to define the type of work that needs to be completed over a specific area of interest (AOI). Metrics can only be calculated for task group (parent) jobs; metrics are not calculated for task (child) jobs.

  • The tool will not run on a task group job that has open task (child) jobs.

  • If a status layer is defined by the production type of the job, you do not need to specify that status layer in the tool. The tool will update the Status Layer based on the Job ID.

  • Only use Status Layer to update a status polygon feature class that is not the standard polygon feature class created as part of the Topographic Mapping production management workflow.

  • If Status Layer and Status Field are defined, the tool will identify the Status Layer feature that matches the AOI of the job and update Status Field with today’s date. If no feature in Status Layer matches the AOI, a new feature will be added to Status Layer with the AOI.

  • Status Layer must be a polygon feature class.

  • Status Field must be a text or date field that will store the last modification date for each feature.

语法

UpdateTaskGroupMetrics(job_id, {status_layer}, {status_field}, {database_path})
参数说明数据类型
job_id

The job ID of the job that will be updated.

Long
status_layer
(可选)

The feature class containing status polygons that keep track of the last time work occurred over an extent. Only use this parameter to update a polygon feature class that is not the standard status polygons created by the Topographic Workflow.

Feature Layer
status_field
(可选)

The text or date field in which the last modified date will be stored. The parameter is only enable, if a Status Layer value is defined.

Field
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 Job ID of the updated Workflow Manager (Classic) child job.

Long
updated_status_layer

The updated Status Layer if one was provided.

Feature Layer

代码示例

UpdateTaskGroupMetrics example 1 (stand-alone script)

The following stand-alone script demonstrates how to use the UpdateTaskGroupMetrics function to update and summarize task group metrics that are part of the standard Topographic Workflow deployment of Workflow Manager (Classic).

# Name: UpdateTaskGroupMetrics_ex1.py
# Description: Sample script updates and summarizes task group metrics using
# the status feature class associated with the 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
job_id = 2031
status_layer = '#' 
status_field = '#'
database_path = r'C:\Data\Workflows\Testing.jtc'

# Calling the Update Task Group Metrics tool
arcpy.topographic.UpdateTaskGroupMetrics(job_id,status_layer, status_field, database_path)

# Check In Extensions
arcpy.CheckInExtension('Foundation')
arcpy.CheckOutExtension('JTX')
UpdateTaskGroupMetrics example 2 (stand-alone script)

The following stand-alone script demonstrates how to use the UpdateTaskGroupMetrics function to update a status_layer that is specified in the script.

# Name: UpdateTaskGroupMetrics_ex2.py 
# Description: Sample script updates and summarizes task group metrics using
# a status feature class that is not associated with the 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
job_id = 1234
status_layer = 'C:\Data\Workflows\Testing.sde\CTM_STATUS'
status_field = 'last_mod_date'
database_path = r'C:\Data\Workflows\Testing.jtc'

# Calling the Update Task Group Metrics tool
arcpy.topographic.UpdateTaskGroupMetrics(job_id, status_layer, status_field, database_path)

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

环境

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

许可信息

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

相关主题