Create Job For Task (Topographic Production)

サマリー

Automatically creates a Workflow Manager (Classic) job for a task.

注意:

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.

  • The Set Task List and Set Next Task tools must be run before this tool to define the task that will have a job created. A job will be created for the task set as the current task.

  • When the task job is created, it will be created as a child of the job specified in the Job ID parameter when the tool is run.

  • A dependency will automatically be placed on the parent job specified in the Job ID parameter. You cannot run the next steps in the parent job until the created task child job has reached the competed status.

パラメーター

ラベル説明データ タイプ
Job ID

The job ID of the Workflow Manager (Classic) job that will be the parent to the newly created child job. The Current Task extended property value for this job will be used to determine the type of task job that will be created.

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

派生した出力

ラベル説明データ タイプ
Child Job ID

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

Long

arcpy.topographic.CreateJobForTask(job_id, {database_path})
名前説明データ タイプ
job_id

The job ID of the Workflow Manager (Classic) job that will be the parent to the newly created child job. The Current Task extended property value for this job will be used to determine the type of task job that will be created.

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

派生した出力

名前説明データ タイプ
child_job_id

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

Long

コードのサンプル

CreateJobForTask example (stand-alone script)

This script uses the CreateJobForTask tool to create the next task related to a parent job.

# Name: CreateJobForTask_sample.py
# Description: This script creates the next task related 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
input_database_connection = r'C:\Data\Workflows\Testing.jtc'

# Calling the Create Job For Task tool to create the next task related to the parent job
arcpy.topographic.CreateJobForTask(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: No
  • Standard: 次のものが必要 Production Mapping and Workflow Manager
  • Advanced: 次のものが必要 Production Mapping and Workflow Manager

関連トピック