StatusType

此 ArcGIS 2.8 文档已 存档,并且不再对其进行更新。 其中的内容和链接可能已过期。 请参阅最新文档

摘要

StatusType对象可用于访问 Workflow Manager (Classic) 数据库中的状态类型配置元素。

说明

状态类型是用于描述作业在执行期间所经历的状态的状态模板。

属性

属性说明数据类型
caption
(只读)

关于 StatusType 的说明文字。

String
description
(只读)

关于 StatusType 的描述。

String
ID
(只读)

StatusType 的 ID。

Integer
name
(只读)

StatusType 的名称。

String

代码示例

StatusType 示例

以下脚本可获取 Workflow Manager (Classic) 数据库中的状态类型。

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)