How to show a loading form while an API runs?
Comments
-
Were working on a flow that waits on an API to run and redirects a user when it completes. We want to show a loading/processing screen or something of the sort so our users arent staring at a blank page and wondering whats going on. So far the only thing weve really figured out is the URL redirect and we cant figure out the other features, like how to get the form to automatically close.
Any advice?
-
Hey Jon,
Ive attached an example of something almost exactly like this.
[img]att2[/img]This example consists of these parts:
1) A form that waits on an API to complete - This has a data flow and an outcome rule that control the auto-close function.
2) An async subflow - This would run your integration steps while the form waits for this to complete.
3) An End Form Session step - The behavior is set to Open URL. This will end the form session and redirect to a chosen URL.The way this example works is by running the flow with your API as an asynchronous subflow. When it completes, a put value in cache step places a value into a cache you set up (you can configure or set up caches under System > Administration > Cache). A data flow on the form runs every 10 seconds and checks the cache for the key you added. When it finds it, it updates an invisible checkbox on the form that triggers an outcome rule and closes the form. The end form session step is set to Open URL which should navigate the user to the selected URL.
Note that this is a loose example intended to demonstrate a rough concept and cannot be expected to work with an integration out of the box. Some configuration may also be required for this to debug properly on your end.
[i]edited by Watson@decisions.com on 9/30/2019[/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