How Can I Automatically Close A Form?
Comments
-
I have a flow which calls an external web service and it can take awhile to complete. I would like to be able to call the web service and display a user form notifying the user that it is running while also giving them the option to wait on the process or be notified when completed. In what way can I implement the form closing automatically when the web service completes?
-
[font=Roboto, sans-serif]1) Put your web service call in an async flow. In this flow, make the web service call, and once it completes set a flag in the cache. You can use whatever values you want for the cache instance name and key, but cache type name needs to be Default.MemoryCache [/font]
[font=Roboto, sans-serif]
[/font]
[font=Roboto, sans-serif]2) On your form have two outcomes. One for Be Notified and one for Wait. The Wait button should have Initially Visible set to false.[/font]
[font=Roboto, sans-serif]
[/font]
[font=Roboto, sans-serif]3) Add a check box on the form that has Initially Visible set to false.[/font]
[font=Roboto, sans-serif]
[/font]
[font=Roboto, sans-serif]4) Create a data flow that gets your flag from the cache and checks if it is finished or not. The data flow should update the checkbox on the form to true if the web service is finished[/font]
[font=Roboto, sans-serif]
[/font]
[font=Roboto, sans-serif]5) The data flow does not need a trigger. Instead set it to Auto Run. The time you set here is how often the flow will run to check if the web service is finished.[/font]
[font=Roboto, sans-serif]
[/font]
[font=Roboto, sans-serif]6) Set up an Outcome Rule on the form that is triggered by the value in the check box changing. When it evaluates true it will automatically close the form using the Wait outcome. The form will now run as soon as the web service starts and will stay open until the web service is finished or someone clicks the Be Notified button.[/font]
[i]edited by jerramy@decisions.com on 4/4/2019[/i]
Howdy, Stranger!
Categories
- 4.2K All Categories
- 67 General
- 11 Training
- 202 Installation / Setup
- 1.1K Flows
- 106 Rules
- 262 Administration
- 212 Portal
- 490 General Q & A
- 695 Forms
- 333 Reports
- 3 Designer Extensions
- 47 Example Flows
- 52 CSS Examples
- 1 Diagram Tile
- 7 Javascript Controls
- 179 Pages
- 5 Process Mining
- New Features
- 179 Datastructures
- 69 Repository
- 221 Integrations
- 28 Multi-Tenant
- 27 SDK
- 78 Modules
- 56 Settings
- 25 Active Directory
- 12 Version 7
- 35 Version 8
- 83 Lunch And Learn Questions