Newer Version Available
Display Flow Stages by Wrapping a Progress Indicator
Example
This c:flowStages_global component uses lightning:progressindicator to display the flow’s stages and lightning:flow to display the flow.
c:flowStages_global Component
c:flowStages_global Design
The design resource includes the flowName attribute, so you can specify which flow to start from Lightning App Builder.
c:flowStages_global Style
c:flowStages_global Controller
The controller uses the flowName attribute to determine which flow to start.
Each time a new screen loads, the onstatuschange action fires, which gives the controller access to a handful of parameters about the flow. The currentStage and activeStages parameters return the labels and names of the relevant stages.
When onstatuschange fires in this component, it calls the controller's statusChange method. That method passes the flow's currentStage and activeStages parameters into the component's attributes. For each item in the activeStages attribute, the method adds a lightning:progressStep component to the component markup.