Summary
Creates one or more jobs of the selected job type and assigns the jobs to a user. The created jobs can be prioritized and have an area of interest (AOI) defined from a feature layer or feature class.
Note:
The CreateJob privilege is required to create jobs.
Legacy:
This is a deprecated tool. This functionality has been replaced with the Create New Jobs tool that creates jobs with group assignment and point of interest as well.
Usage
Jobs are created with properties that are configured in the job type template specified in the Job Type parameter. If a value for the user assignment and priority are not specified, the default properties configured in the job type template are used.
When Merge features to create one AOI is checked (Union_option = "UNION" in Python), the Number of Jobs To Create parameter is ignored and one job will be created based on the geometric union of all features in the AOI Extent parameter. If Merge features to create one AOI is unchecked (Union_option = "NO_UNION" in Python), one job will be created for each feature in the AOI Extent parameter and the Number of Jobs To Create parameter is ignored.
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.CreateJobs(Input_DatabasePath, Job_Types, Number_of_Jobs, {Users}, {Priority_of_Jobs}, {Feature_Layer_AOI}, {Union_option})
Parameter | Explanation | Data 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_Types | The job type to be used for creating the new job. | String |
Number_of_Jobs | The number of new jobs to be created. This input is ignored if the Feature_Layer_AOI parameter has a value or if Union_option = "UNION". | Long |
Users (Optional) | The user to whom the new jobs will be assigned. If no value is specified, the default value configured in the job type is used. The user or group the new jobs will be assigned to. If no value is specified, the default value configured in the job type is used. | String |
Priority_of_Jobs (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_AOI (Optional) | The polygon features whose geometry will be used to create the AOI of the new jobs. One job will be created for each feature in the layer unless Union_option = "UNION". | Feature Layer |
Union_option (Optional) | Specifies whether one job will be created with the union of all AOI polygons.
| Boolean |
Derived Output
Name | Explanation | Data Type |
Job_ID | The ID of jobs created. When the AOI overlap system setting is set to disallow AOI overlap, the jobs and their respective AOI are created for only those geometries that do not overlap with an existing AOI. |
Code sample
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_Types = "Data Edits"
Users = "Postinstall User"
Priority_of_Jobs = "High"
Number_of_Jobs = 2
Feature_Layer_AOI = r"c:\AOI.gdb\AOI"
Union_Option = "UNION"
# Process: Create jobs
arcpy.CreateJobs_wmx(Input_DatabasePath,Job_Types, Users, Priority_of_Jobs,
number_of_Jobs, Feature_Layer_AOI, Union_Option)
Environments
Licensing information
- Basic: No
- Standard: Requires Workflow Manager
- Advanced: Requires Workflow Manager