Summary
The Workflow object provides access to properties to interact with the Workflow Manager (Classic) workflow of a job.
Discussion
Represents the workflow structure of a job. A workflow contains steps representing individual tasks, connected by paths that define the flow. Each individual task that must be completed to complete the business process is identified and created as a step. Steps are instances of step types and are associated with a specific workflow. A workflow can have multiple instances of the same step type, and each of the instances can have properties configured in a different way from others.
Properties
Property | Explanation | Data Type |
name (Read Only) | The name of the Workflow. | String |
steps (Read Only) | Returns a list of the WorkflowStep objects that compose the workflow. | Object |
Code sample
Workflow example 2
The following script gets a job's workflow from the Workflow Manager (Classic) database and displays its name.
import arcpy
import arcpywmx
# Establish a connection to a Workflow database
conn = arcpywmx.Connect(r'c:\test\Workflow.jtc')
# Access a Job
job = conn.getJob(99999)
# Access a the job's workflow
workflow = job.getWorkflow()
# Print the name of the workflow
print(workflow.name)