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.

提示:

It is recommended that current Workflow Manager (Classic) users begin new projects using the services-driven version of ArcGIS Workflow Manager for ArcGIS Pro.

使用情况

  • 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 value based on the Job ID value.

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

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

  • The Status Layer parameter value must be a polygon feature class.

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

参数

标注说明数据类型
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. This parameter is enabled if a Status Layer parameter value is defined.

Field
Input 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 value if one was provided.

Feature Layer

arcpy.topographic.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. This parameter is enabled if a Status Layer parameter 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 value 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

相关主题