描述
Priority 对象提供对 Workflow Manager (Classic) 数据库中优先级配置元素的访问权限。
讨论
优先级可为作为作业的一部分来完成的工作分配重要性级别。
属性
属性 | 说明 | 数据类型 |
description (只读) | 关于 Priority 的描述。 | String |
name (只读) | Priority 的名称。 | String |
value (只读) | Priority 的值。 | Integer |
代码示例
以下脚本用于创建作业并为其分配高优先级。
import arcpy
import arcpywmx
# Establish a connection to a Workflow database
conn = arcpywmx.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 he value to change the job priority
for high in priorities:
if high.name == 'High':
job.priority = high.value