Suppose there’s a WF that runs when Condition A = True. The WF is made of a few steps. One of them sets Condition A = False.
A problem I’m having from time to time in different WFs with the above structure is that the same WF fires twice. In particular:
T1: The Condition A is True and the WF fires. Let’s call this run “Run1”. It will take a few milliseconds before it reaches the step where it sets Condition A = False
T2: Run1 has not yet reached the step where it set Condition A = False, therefore Condition A is still True and the same WF fires again (“Run2”).
Is there a way to avoid Run2 if Run1 is still running?
Thanks in advance.
Share the screen shots of your setup for the workflows…so many different ways to approach a setup that it is helpful for others to see what you did to help you figure out how to resolve for the issue.
My problem is that while this WF is still running its firs run (“Run1”) for a few milliseconds the condition “user is logged out” is still true and the same WF fires again (“Run2”).
When Run2 reaches step3 , it causes the errore USED_EMAIL as it is attempting to create an account with the same email used by Run1.
The same problem happens to me in other similar circumstances.
as mentioned you could try changing the type of trigger used.
You could also use a condition based on a custom state. The condition would be on the trigger and reference the custom state value which could be a yes/no…then in the first step before you show the popup you could switch the value of the custom state so the condition on the trigger would no longer evaluate as true.
Or instead of bothering with custom state, just use a condition that is the ‘popup loading screen is not visible’ which when you run step 1 to show the popup would make the condition evaluate to no and not fire again.