I’m having trouble making a workflow follow a specific order, even when using custom events.
I know the basic workflow sequence rules and I’m trying to make use of this rule:
Custom events run in sequence, not parallel. If Workflow 1 triggers a custom event that starts Workflow 2, Workflow 2 will complete before the remaining actions in Workflow 1 run.
But when trying to perform the following actions, this is not the behavior I’m getting:
Step1: Create an account for someone else and return the user if the account already exists:
Step2: If the field “empresa” from this user is not empty (would be the same as saying this user already existed) then run this CUSTOM WORKFLOW.
Step3: If the field “empresa” from this user is empty (would be the same as saying this user didn’t exist before) then run this another CUSTOM WORKFLOW.
As I was expecting custom workflows to run in sequence, the step two should happen before the step 3. But that is not what is happening.
My Custom workflow from step 3 is responsible for populating the field “empresa” from this user and when the sequence is not repected, the step 2 and 3 runs in this workflow.
Take the result of step one and store it in some custom state. Then run the two last tests off of the custom state. I believe the way it is set up now is causing step one to run twice to test the condition.
Inside this custom workflow, there are 3 actions with conditions using the custom states set in the above workflow. The step 3 here is another Custom event that run some actions to populate de user if he didn’t have a company and send him a reset password email.
(Empresa here is the custom state)
Even doing this way, somehow this last step (the last custom event) fires, and to make things even more strange, somehow it fires just an action to make changes to the user and send a reset password email, the other actions like closing the pop up that I’m using to fire this action doens’t fire.