Control a Flow’s Finish Behavior by Wrapping the Flow in a Custom Aura Component
By default, when a flow user clicks Finish, a new interview starts and the user sees the first screen of the flow again. By embedding a flow in a custom Aura component, you can shape what happens when the flow finishes by using the onstatuschange action. To redirect to another page, use one of the force:navigateTo* events such as force:navigateToObjectHome or force:navigateToUrl.
To control a flow’s finish behavior at design time, make your custom Aura component available as a flow action by using the lightning:availableForFlowActions interface. To control what happens when an autolaunched flow finishes, check for the FINISHED_SCREEN status.
In this example, the function redirects the user to a case created in the flow by using the force:navigateToSObject event.
See Also