Create New Jobs (Workflow Manager)

Available with Workflow Manager license.

Summary

Creates one or more jobs of the selected job type and assigns the jobs to a user or user group. The created jobs can be prioritized and assigned a polygon or point location of interest (LOI).

Note:

The CreateJob privilege is required to create jobs.

Usage

  • Jobs are created with properties, such as workflow, and extended properties that are configured in the job type template specified in the Job Type parameter. If values for the Assignment Type, Assign To, and Priority parameters are not specified, the default values configured in the job type template are used.

  • The LOI is defined in the LOI Extent parameter. The LOI can be a single-part or multipart feature consisting of either polygons or points. The LOI can be defined using a feature class or shapefile with polygons, points, or multipoints to be used for the LOI of jobs to be created. One job is created for each input feature row, unless Merge features to create one LOI is checked (Union = "UNION" in Python).

  • When Merge features to create one LOI is checked (Union = "UNION" in Python), the Number of Jobs parameter is ignored and one job will be created based on the geometric union of all features in the LOI Extent parameter. If Merge features to create one LOI is unchecked (Union = "NO_UNION" in Python), one job will be created for each feature in the LOI Extent parameter and the Number of Jobs parameter is ignored.

  • When the Workflow Manager (Classic) LOI overlap system setting is set to disallow LOI overlap, the jobs and their respective LOIs are created only for those geometries that do not overlap with any existing polygon, point, and buffered LOI.

  • When the Input Database Path (.jtc) parameter value is changed to a .jtc file for a different database, the existing values for the remaining parameters are not cleared. If those values do not exist in the currently selected database, it will be indicated as an invalid value.

  • When the tool is used in a model, you can iterate each of the output Job IDs by connecting the output to a submodel with the Iterate Multivalue tool as the first step. This will allow you to use each newly created Job ID individually to perform further geoprocessing analysis that is included in the submodel.

Syntax

arcpy.wmx.CreateNewJobs(Input_DatabasePath, Job_Type, Number_of_Jobs, {Assignment_Type}, {Assign_To}, {Priority}, {Feature_Layer_LOI}, {Union})
ParameterExplanationData Type
Input_DatabasePath

The Workflow Manager (Classic) database connection file that contains the job type information. If no connection file is specified, the current default Workflow Manager (Classic) database is used.

File
Job_Type

The job type to be used for creating the new job.

String
Number_of_Jobs

The number of jobs to be created. This input is ignored if the Feature_Layer_LOI parameter has a value or if Union = "UNION".

Long
Assignment_Type
(Optional)

Specifies the assignment type to use to assign new jobs. If no value is specified, the default value configured in the job type is used.

  • GroupsThe new jobs will be assigned to a group.
  • Users The new jobs will be assigned to a user.
  • UnassignedThe new jobs will be unassigned.
String
Assign_To
(Optional)

The user or group to whom the new jobs will be assigned. The value is restricted to a user or group based on the selected assignment type.

String
Priority
(Optional)

The priority of the jobs that will be created. If no priority is specified, the default value configured in the job type is used.

String
Feature_Layer_LOI
(Optional)

The polygon, point, or multipoint features whose geometry will be used to create the LOI of the new jobs. One job will be created for each feature in the layer unless Union = "UNION".

Feature Layer
Union
(Optional)

Specifies whether one job will be created with the union of all polygons, point, or multipoint in the input feature layer as the LOI of the job.

  • UNIONOne union polygon or multipont feature will be generated from the LOI features and one job will be created regardless of the input number of jobs.
  • NO_UNIONEach feature in the input layer will be used to generate the LOI of one job. The total number of jobs created is equal to the total number of input features. This is the default.
Boolean

Derived Output

NameExplanationData Type
Job_ID

The ID of the created jobs. When the LOI overlap system setting is set to disallow LOI overlap, the jobs and their respective LOI are created for only those geometries that do not overlap with an existing polygon, point, or buffered LOI.

String

Code sample

CreateNewJobs example (stand-alone script)

Create jobs from a job template and assign them to a user.

# Import arcpy module
import arcpy

# Check out any necessary licenses
arcpy.CheckOutExtension("JTX")

# Local variables:
Input_DatabasePath = "C:\\Program Files\\WMX\\Database\\wmx.jtc"
Job_Type = "Data Edits"
Assignment_Type = "users"
Assign_To = "Postinstall User"
Priority = "High"
Number_of_Jobs = 2
Feature_Layer_LOI = r"c:\LOI.gdb\LOI"
Union = "UNION"

# Process: Create jobs
arcpy.CreateNewJobs_wmx(Input_DatabasePath, Job_Type, Number_of_Jobs,
                        Assignment_Type, Assign_To, Priority, Feature_Layer_LOI,
                        Union)

Environments

This tool does not use any geoprocessing environments.

Licensing information

  • Basic: No
  • Standard: Requires Workflow Manager
  • Advanced: Requires Workflow Manager

Related topics