概要
The StatusType object provides access to the status type configuration elements in the Workflow Manager (Classic) database.
ディスカッション
The status types are a template for the statuses used to describe the states that a job moves through during its execution.
プロパティ
プロパティ | 説明 | データ タイプ |
caption (読み取り専用) | A caption about the StatusType. | String |
description (読み取り専用) | A description about the StatusType. | String |
ID (読み取り専用) | The ID of the StatusType. | Integer |
name (読み取り専用) | The name of the StatusType. | String |
コードのサンプル
The following script gets the status types in the Workflow Manager (Classic) database.
import arcpy
#Establish a connection to a Workflow database
conn = arcpy.wmx.Connect(r'c:\test\Workflow.jtc')
#Get a list of Status Types in the Workflow database
statustypes = conn.config.getStatusTypes()
#Access a Workflow Job
job = conn.createJob(job_type_name="Landbase Updates")
#Find the name of the status type with an id of 2 and use the value to change the job's status
for statustypeid in statustypes:
if(statustypeid.ID==2):
job.status=statustypeid.name
#Print the name of the job's new status
print(job.status)