JobTypeDescription

Résumé

The JobTypeDescription provides access to job type properties that can be customized before creating a job.

Discussion

The properties of the job type that can be customized and assigned to a new job being created.

Propriétés

PropriétéExplicationType de données
AOI
(Lecture/écriture)

The polygon object to be used as the AOI of the job. A list of polygon objects can be provided to create multiple jobs. One job is created for each polygon object provided and the polygon is used to create the AOI of the job.

Héritage :

This property has been deprecated. Use LOI instead.

Polygon
assignedTo
(Lecture/écriture)

The user name or group name the job will be assigned to.

String
assignedType
(Lecture/écriture)

The type of assignment for the job. Below is a list of valid strings to use when setting the job assignment.

  • UserA user in the workflow database
  • GroupA group in the workflow database
  • UnassignedNo job assignment
String
autoCommitWorkflow
(Lecture/écriture)

Indicates whether the workflows are automatically ready for execution when the job is created.

  • TrueThe workflow is automatically ready for execution when the job is created.
  • FalseThe workflow must be committed to the database after the job is created.
Boolean
autoExecuteOnCreate
(Lecture/écriture)

Indicates whether the job will be automatically executed after it is created.

  • TrueThe job automatically starts execution after it is created.
  • FalseThe job does not automatically start execution after it is created.
Boolean
createdBy
(Lecture/écriture)

The user name that will be set as the creator of the job.

String
dataWorkspaceID
(Lecture/écriture)

The ID of the data workspace to be set as the data workspace of the job.

String
description
(Lecture/écriture)

A description about the job type.

String
dueDate
(Lecture/écriture)

The due date that will be assigned to the job.

DateTime
extendedProperties
(Lecture/écriture)

A dictionary containing the extended property tables of the job type. Each individual table can be obtained as its own dictionary using the table's name, and new values will be added to the table and saved back to the job type in advance of job creation. A sample is shown below.

Dictionary
jobName
(Lecture/écriture)

The template for the name of the job.

String
jobTypeName
(Lecture/écriture)

The name of the job type that will be used to create a job.

String
LOI
(Lecture/écriture)

The geometry object to be used as the LOI of the job. A list of polygon or point objects can be provided to create multiple jobs. One job is created for each point or polygon object provided and the geometry is used to create the LOI of the job.

Geometry
ownedBy
(Lecture/écriture)

The user who is the owner of the job.

String
parentJobID
(Lecture/écriture)

The ID of the job that would be the parent of the job created.

Integer
parentJobName
(Lecture/écriture)

The name of the job that would be the parent of the job created.

String
parentVersionName
(Lecture/écriture)

The name of the version that would be the parent version created for the job.

String
prefix
(Lecture/écriture)

The prefix to be added to the name of the job.

String
priority
(Lecture/écriture)

The priority to be assigned to the job after its creation.

Integer
startDate
(Lecture/écriture)

The date when the job will be started.

DateTime
suffix
(Lecture/écriture)

The suffix to be added to the name of the job.

String
unionAOI
(Lecture/écriture)

Indicates whether the list of polygon objects passed as the AOI will be merged to create one job or multiple jobs.

  • TrueThe workflow is automatically ready for execution when the job is created.
  • FalseThe workflow must be committed to the database after the job is created.
Héritage :

This property has been deprecated. Use unionLOI instead.

Boolean
unionLOI
(Lecture/écriture)

Indicates whether the list of polygon or point objects passed as the LOI will be merged to create one job or multiple jobs.

  • TrueThe workflow is automatically ready for execution when the job is created.
  • FalseThe workflow must be committed to the database after the job is created.
Boolean
versionName
(Lecture/écriture)

The name of the version that would be the version associated with the job.

String

Exemple de code

The following script gets the job type description and updates two extended property table values prior to job creation.

import arcpy

#Establish a connection to a Workflow database
conn = arcpy.wmx.Connect(r'c:\test\Workflow.jtc')

#Get the Job Type description 
desc = conn.config.getJobTypeDescription(job_type_name="Extended Example")

#Get the Extended Properties dictionary for the Job Type
ext_prop = desc.extendedProperties

#Define new values to use for Extended Property's Name and Address
ext_prop_dict = {'NAME' : 'John Smith', 'ADDRESS' : '106 Everdale Drive' }

#Set the new values in the appropriate Extended Property table
ext_prop['TestDB.ExtendedTable'] = ext_prop_dict

#Apply the ext_prop dictionary back to the Job Type's desc object
desc.extendedProperties = ext_prop

#Create a Job using the new Job Type description
job = conn.createJob(job_type_description = desc)

#Get the Job's properties
job_props = job.getExtendedPropertyTable('TestDB.ExtendedTable')

#Print the new extended property Name value for the Job
print(str(job_props['NAME']))