サマリー
The Priority object provides access to a priority configuration element in the Workflow Manager (Classic) database.
説明
The priority assigns a level of importance to the work to be completed as part of the job.
プロパティ
プロパティ | 説明 | データ タイプ |
description (読み取り専用) | A description about the Priority. | String |
name (読み取り専用) | The name of the Priority. | String |
value (読み取り専用) | The value of the Priority. | Integer |
コードのサンプル
The following script creates a job and assigns a high priority to it.
import arcpy
#Establish a connection to a Workflow database
conn = arcpy.wmx.Connect(r'c:\test\Workflow.jtc')
#Get a list of Priorities in Workflow database
priorities = conn.config.getPriorities()
#Access a Workflow Job
job = conn.createJob(job_type_name="Landbase Updates")
#Find the id of high priority and use the value to change the job priority
for high in priorities:
if(high.name=='High'):
job.priority=high.value
job.save()