Summary
The WorkflowPath object provides access to the attributes of a path contained within a job Workflow.
Discussion
The WorkflowPath object supports describing a path and navigating through the workflow.
Properties
Property | Explanation | Data Type |
description (Read Only) | The description of the path, also known as the path name. | String |
fromStep (Read Only) | The ID of the WorkflowStep object the path originates from. | Integer |
toStep (Read Only) | The ID of the destination WorkflowStep object the path is headed towards. | Integer |
Code sample
The following script obtains a workflow path's description and the step IDs of the steps that go into and out of the path.
import arcpy
#Establish a connection to a Workflow database
conn = arcpy.wmx.Connect(r'c:\test\Workflow.jtc')
#Access a Job
job = conn.getJob(99999)
#Access a the job's workflow
workflow = job.getWorkflow()
#Access the first step in the workflow
step = workflow.steps[0]
#Access the paths following the first step in the workflow
paths = step.nextSteps
#Access the first path and print the ID of the step it leads to
path = paths[0]
print('The ID of the step that follows the first step is ' + path.toStep)