The WorkflowStep object provides access to the attributes of a step contained within a job Workflow.


The WorkflowStep supports describing a step and navigating through the workflow.


PropriétéExplicationType de données
(Lecture seule)

The ID of the WorkflowStep.

(Lecture seule)

The name of the WorkflowStep.

(Lecture seule)

A list of the WorkflowStep IDs that follow this step in the workflow.


Exemple de code

WorkflowStep example 1

The following script searches a job's workflow for the step IDs corresponding to a specific step name, and also the step name corresponding to a specific step ID.

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]

#Print the name of the first step
print (

#Find the step IDs of all the steps named "Clean Up" in the workflow
stepIDs = [x.ID for x in workflow.steps if == "Clean Up"]

#Print the step IDs of the steps named "Clean Up"
print (stepIDs)

#Find the step name of the step with the ID of 123
stepName = [ for y in workflow.steps if y.ID == 123]

#Print the name of the step with an ID of 123
print ("The step name for ID 123 is " + stepName[0])