Hi there!
I want to use backend workflows to create things in the database when the user makes an action.
The problem is that backend workflows can be a quite slow. So, is it possible to show an animation while the backend workflow is running, and the hide it when the backend workflow finished? (And also redirect the user to a page with the thing created)
Thanks!
So, is it possible to show an animation while the backend workflow is running, and the hide it when the backend workflow finished?
Sure… you just need to have some way of knowing when the backend workflow is finished…
How you do that will depend on what the backend workflow is doing and how it’s triggered…
But, for example, if the backend workflow is running recursively to create a list of things, you can create a Log entry in your DB before the backend workflow is scheduled, then update it as the workflow runs, and mark it as complete once it’s finished.
Then just use some on-page conditions to show and hide your animation based on the Log’s completed status…
If you’re not using a recursive workflow, you can always use a database count, or check for a things that is empty/not empty, or you can use a ‘Trigger a custom event when data changes’ action…
Or you can use the API connector to trigger the backend workflow (instead of the schedule an API workflow action), and then use the response to determine when to hide the animation, and get the Thing created…
So there are various ways to do it, and as always that will depend entirely on what you’re trying to do and how your app is set up…
Thank you so much for your answer, definitely better that I expected!