Basic Use Cases
There are two basic use cases for dynamic loading:
Scenario 1: Launching Background (Autolaunched) from Screen Flows and Other Background Flows
One example of this is when you want to create a screen flow that can start an orchestration (which is a form of background flow). Another example of this is when you have a Schedule-Triggered background flow and you want it to do callouts. This doesn’t work if you add the callout directly (because the callout conflicts with the transaction that is opened by the schedule alarm) but will work if you put the action in a separate flow and launch it dynamically.
To launch a Background flow, use the Launch Flow Dynamically action. It’s discussed and is available for installation here.
Scenario 2: Screen Flows Launching Other Screen Flows
You have a screen flow and you want it to load another screen flow, but you don’t want to have to decide on which flow to load until the first flow runs. Suppose you have 20 screen flows representing 20 different business processes, and you want to dynamically determine which one a user should be brought to. One way to do this is to have a master flows with 20 subflows and a big decision element. That’s a little inflexible, though. Each time you add or delete something you have to change the master flow. And managing the big decision element takes work that it would be nice to be able to avoid.
The basic principle behind launching a screen flow is to assemble the corresponding URL and ask the browser to open it. This video show how to do this, combining the Open URL extension and a formula that assembles the URL:
Determining Which Flow To Launch
Of course, you don’t have to leave the choice of flow up to the user who is running the flow. You can generate the name of the flow to launch via your own flow logic.
Unmanaged 1.1 This installs the demo flow from the video, including the Flow List FSC picker and the Open URL Flow Action
The sample Flow we use in the above video incorporates two components:
1) a Flow List component provides users with a list of flows to choose from.
2) A new Open URL Flow Action launches the chosen screen flows by URL.