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.

Sugerencia:

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

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

Parámetros

EtiquetaExplicació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. This parameter is enabled if a Status Layer parameter value is defined.

Field
Input 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

EtiquetaExplicació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 value if one was provided.

Feature Layer

arcpy.topographic.UpdateTaskGroupMetrics(job_id, {status_layer}, {status_field}, {database_path})
NombreExplicació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. This parameter is enabled if a Status Layer parameter 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 value 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