Set Task List (Topographic Production)

摘要

Populates the list of expected tasks for a job based on the selected task group.

警告:

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.

使用情况

  • 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, the type of work to be completed for this unit of work is typically defined by the assignment of a task group ID. This tool is used when the task group job has been created to define the list of tasks that need to be completed for that job.

  • This tool requires that the Task Group extended property is configured with a valid task group ID. The chosen task group ID will determine the tasks that need to be executed.

  • The task list created by this tool is required by the Set Next Task, Create Job for Task, Set Task Status, and Insert Task Group tools. To ensure the tools work correctly, this tool must be run first.

参数

标注说明数据类型
Job ID

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

Long
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) job.

Long

arcpy.topographic.SetTaskList(job_id, {database_path})
名称说明数据类型
job_id

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

Long
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) job.

Long

代码示例

SetTaskList example (stand-alone script)

This script uses the SetTaskList tool to set the task list on a workflow and create records based on the workflow type.

# Name: SetTaskList_sample.py
# Description: This script sets the task list on a workflow and creates records based on the workflow type

# 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 = 1025
input_database_connection = r'C:\Data\Workflows\Testing.jtc'

# Calling the Set Task List tool to create records for the data production tasks on the Extract Task Group job
arcpy.topographic.SetTaskList(job_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')

环境

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

许可信息

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

相关主题