Selecting a Flow or Form at Runtime
Comments
-
We want to select the next form / flow based on a users selection on the initial form without having a bunch of different outcome buttons. Is there a way to do this with one outcome path? Like selecting a flow at runtime or something?
-
You could probably use runtime flow selection in this situation. Runtime flow selection takes in a Flow ID and runs the flow that the ID corresponds to.
Ive attached an example that you can run that highlights how it works. If you see the attached video, running the "Main Flow - Runtime Select Example" will run a different flow and display a different form depending on what create data step the start step is mapped to. This is enabled by changing a flows behavior to "Runtime Selection".
[img]att6[/img]
Heres how you can set this up on your own:
1) On a standard Run Flow Step, change the Selection Type from "Pick" to "Runtime Selection".
2) Create a Flow under Pick or Create Flow. Connect the Start Step to the End Step and leave it empty. Configure the Inputs and Outputs for the Flow. If you are planning on having a form on your flows, you will need to configure a form as runtime selection on this flow as well (More on this below).
3) You now need to create Flows for all of the runtime options you have. Note that the Inputs and Outputs of these need to be identical in name to the empty Runtime Selection Flow you created. After these are created, youll need to get the Flow ID by Right Clicking on it and going to Manage > Get Flow ID and record it somewhere.
[img]att5[/img]
4) On the Input mapping for the Run Time Selection Subflow, the "Target ID" value is for the Flow ID of the appropriate Flow to run.
[img]att4[/img]
As mentioned above, its necessary to include a runtime selectable form inside of the flow created in step #2 for the runtime selection flow. To set this up, you can make a form (in the attached example, this form is basically just blank with one outcome) and enable runtime selection under Form Setup on the forms properties tab.
[img]att3[/img]
Much like with the runtime selection flow, this is going to take in a FormID and run that specific form at runtime. Looking at the "Runtime Template Form" and comparing it to the "Runtime Select Forms" in the example should provide some more clarity on this.
Here is a link to our docs on this for some further reading: https://documentation.decisions.com/docs/adjusting-at-runtime-what-sub-flows-are-run-from-flow-engine
[i][b]Please Note[/b]: The examples attached were developed to be instructional, and were not developed as officially supported components. For more information or to engage our service team to develop fully supported, production quality solutions, please contact: services@decisions.com [/i]
[i]edited by Watson@decisions.com on 5/7/2020[/i]
[i]edited by Watson@decisions.com on 5/7/2020[/i]
Howdy, Stranger!
Categories
- 4.1K All Categories
- 61 General
- 11 Training
- 201 Installation / Setup
- 1.1K Flows
- 106 Rules
- 260 Administration
- 212 Portal
- 489 General Q & A
- 693 Forms
- 333 Reports
- 3 Designer Extensions
- 47 Example Flows
- 51 CSS Examples
- 1 Diagram Tile
- 7 Javascript Controls
- 178 Pages
- 5 Process Mining
- New Features
- 178 Datastructures
- 69 Repository
- 219 Integrations
- 28 Multi-Tenant
- 27 SDK
- 76 Modules
- 56 Settings
- 25 Active Directory
- 12 Version 7
- 35 Version 8
- 66 Lunch And Learn Questions