What is the best way to manage concurrency and throttling in workflows.
I know that I can use a var as a bool, change it at the beginning and at the end of the workflow. This is pretty manual and prone to errors.
The use case, for example is a submit form. User may press ‘enter’ more than one in a 1second period.
Is there any better or more sophisticated way to do it?
Yes, thats exactly how you do it. Its hard to find something generic, because every form or action has their own logic (you may want to block several actions for example).