Update Task Group Metrics (Topographic Production)

Resumen

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

Precaución:

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.

Precaución:

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.

Uso

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

Sintaxis

arcpy.topographic.UpdateTaskGroupMetrics(job_id, {status_layer}, {status_field}, {database_path})
ParámetroExplicaciónTipo de datos
job_id

The job ID of the job that will be updated.

Long
status_layer
(Opcional)

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
(Opcional)

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
(Opcional)

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

Salida derivada

NombreExplicaciónTipo de datos
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

Muestra de código

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

Entornos

Esta herramienta no utiliza ningún entorno de geoprocesamiento.

Información de licenciamiento

  • Basic: No
  • Standard: Requiere Production Mapping and Workflow Manager
  • Advanced: Requiere Production Mapping and Workflow Manager

Temas relacionados