Insert Task Group (Topographic Production)

Synthèse

Adds tasks from the chosen task group to a job when required by workflow execution.

Attention :

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.

Attention :

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.

Conseil :

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

Utilisation

  • A task is a small, focused unit of work that can be executed by an individual. Task groups are composed of multiple tasks that, when executed in sequence, complete a type of work. For example, a task group to perform data extraction can be composed of tasks to collect data, validate the data, and publish the data. Task groups and their associated tasks are defined by your Workflow Manager (Classic) administrator as part of configuring the Topographic Mapping workflows.

  • When 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. When a task is ready to be executed, a job is created for the task and is linked to the task group job as a child.

  • When a task group job is created, a list of the basic tasks required for the type of work are added to the job. Sometimes during the execution of a job, it is determined that additional steps are required to successfully complete the work. For example, if data errors are found during a quality control task, you may choose to insert tasks to fix the errors and revalidate the data. The Insert Task Group tool can be used to add these additional tasks after the job is created.

  • The Set Task List tool must be run before this tool to create the task list and ensure that the appropriate tasks are associated to the job.

  • Tasks will be inserted into the task list after the current task and before any remaining tasks with a status of waiting.

  • The Task Group ID parameter value must be a valid task group as defined by your Workflow Manager (Classic) administrator. The task group will define the tasks that will be inserted. The task group ID for the tasks being inserted does not have to match the initial task group defined for the job.

Paramètres

ÉtiquetteExplicationType de données
Job ID

The ID of the Workflow Manager (Classic) job that will be updated. This is the ID for the parent task group job, not the task job.

Long
Task Group ID

The ID of the task group that defines the tasks that will be inserted into the selected job’s task list.

Long
Input Database Path
(Facultatif)

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

Sortie obtenue

ÉtiquetteExplicationType de données
Update Job ID

The ID of the updated Workflow Manager (Classic) job.

Long

arcpy.topographic.InsertTaskGroup(job_id, task_group_id, {database_path})
NomExplicationType de données
job_id

The ID of the Workflow Manager (Classic) job that will be updated. This is the ID for the parent task group job, not the task job.

Long
task_group_id

The ID of the task group that defines the tasks that will be inserted into the selected job’s task list.

Long
database_path
(Facultatif)

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

Sortie obtenue

NomExplicationType de données
update_job_id

The ID of the updated Workflow Manager (Classic) job.

Long

Exemple de code

Insert Task Group example (stand-alone)

Use the InsertTaskGroup tool to add the tasks from a task group to a parent job.

# Name: InsertTaskGroup_sample.py
# Description: Sample script for running the Insert Task Group tool to add the tasks from a task group to a parent 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 = 18
task_group_id = 4
input_database_connection = r'C:\Data\Workflows\Testing.jtc'

# Calling the Insert Task Group tool to add in the data correction tasks to the parent job
arcpy.topographic.InsertTaskGroup(job_id, task_group_id, 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')
arcpy.CheckInExtension('JTX')

Environnements

Cet outil n’utilise pas d’environnement de géotraitement.

Informations de licence

  • Basic: Non
  • Standard: Nécessite Production Mapping and Workflow Manager
  • Advanced: Nécessite Production Mapping and Workflow Manager

Rubriques connexes