Create New Jobs (Workflow Manager)

Available with Workflow Manager license.

Summary

You can create one or more jobs of the selected job type and assign the jobs to a user or a user group. The created jobs can be given a priority and assigned 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, configured in the job type template specified for 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 location of interest (LOI) is defined with the LOI Extent parameter. The LOI can be 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 selected.

  • 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) AOI 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 value for Input Database Path (.jtc) parameter is changed to a .jtc for different database, the existing values for rest of the parameters are not cleared. If those values do not exist in the currently selected database, it would be indicated as an invalid value.

  • When the tool is used in a model, you can iterate through each of the output Job IDs by connecting the output to a submodel with an Iterate Multivalue iterator 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

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

Number of new 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)

The assignment type 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 the new jobs will be assigned to. The value is restricted to user or group based on the selected assignment type.

String
Priority
(Optional)

Priority of the jobs 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 Location of Interest (LOI) of the new jobs. One job will be created for each feature in the layer unless Union = "UNION".

Feature Layer
Union
(Optional)

Choose whether to create one job with the union of all polygons, point, or multipoint in the input feature layer as the LOI of the job.

  • UNIONGenerate one union polygon or multipont feature from the LOI features and create only one job regardless of the input number of jobs.
  • NO_UNIONEach feature in the input layer is 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 jobs created. When the AOI overlap system setting is set to disallow LOI overlap, the jobs and their respective LOI are created only for those geometries that do not overlap with any existing polygon, point, and buffered LOI.

String

Code sample

CreateNewJobs example (stand-alone script)

Create jobs from a job template and assign 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