Question on execution of parallel flows

Hi,

I have a flow sequence in Canvas which is triggered by an event. The flow sequence can run a few seconds.
My assumption is that the sequence can be triggered again although the current sequence is running, correct? As the sequence manipulates page + app variables, I assume this can result in strange behaviour/wrong data.
Is there a best practice to avoid concurrent runs with some kind of locking,…?

Thanks,
jo

I have used this tutorial to build a “button with spinner” while a flow is processing.

https://docs.appgyver.com/appgyver-academy/tutorials/tutorial-articles/button-with-loading-indicator

The general idea is that you use a page variable to set an “activity” state when the button is pressed and then when the flow is done you turn off the “activity” state so the button can be pressed again.

Thank you, unfortunately the action is not directly UI triggered so I cannot use the trick to hide the thing which is starting the flow…

If you share some details I am sure we can adapt the button concept to what you are doing. The idea behind the button concept is more of the use of page variables based on trigger events to control the availability of an action. It just happens to be a button tap.

If yours is just “behind the scene” event triggers you can still have an IF flow function that checks the value of a variable to see if it will allow the triggering of the flow or just “do nothing”

1 Like

Thank you! I now just implemented a spin lock to protect it… :slight_smile:

1 Like