ArcGIS Desktop

  • ArcGIS Pro
  • ArcMap

  • My Profile
  • Help
  • Sign Out
ArcGIS Desktop

ArcGIS Online

The mapping platform for your organization

ArcGIS Desktop

A complete professional GIS

ArcGIS Enterprise

GIS in your enterprise

ArcGIS Developers

Tools to build location-aware apps

ArcGIS Solutions

Free template maps and apps for your industry

ArcGIS Marketplace

Get apps and data for your organization

  • Documentation
  • Support
Esri
  • Sign In
user
  • My Profile
  • Sign Out

ArcMap

  • Home
  • Get Started
  • Map
  • Analyze
  • Manage Data
  • Tools
  • Extensions

WorkflowStep

  • Summary
  • Discussion
  • Properties
  • Code sample

Summary

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

Discussion

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

Properties

PropertyExplanationData Type
ID
(Read Only)

The ID of the WorkflowStep.

Integer
name
(Read Only)

The name of the WorkflowStep.

String
nextSteps
(Read Only)

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

Integer

Code sample

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
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()

#Access the first step in the workflow
step = workflow.steps[0]

#Print the name of the first step
print(step.name)

#Find the step IDs of all the steps named "Clean Up" in the workflow
stepIDs = [x.ID for x in workflow.steps if x.name == "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 = [y.name 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])

ArcGIS Desktop

  • Home
  • Documentation
  • Support

ArcGIS

  • ArcGIS Online
  • ArcGIS Desktop
  • ArcGIS Enterprise
  • ArcGIS
  • ArcGIS Developer
  • ArcGIS Solutions
  • ArcGIS Marketplace

About Esri

  • About Us
  • Careers
  • Esri Blog
  • User Conference
  • Developer Summit
Esri
Tell us what you think.
Copyright © 2021 Esri. | Privacy | Legal