I've created complex automation in JSM Cloud that does a task and then has some verification before the next step. Using several If else loops
So for example
If X then
Create User
else
Log Error : X Missing
If User is created then
Add User to Organization
else
Log Error : User missing
However it seems that the second If sometimes runs before the first.
So it logs User missing, but then creates the user.
I have several of these loops to verify the process have run correctly before the next step
Anyone know a way of ensuring they run is sequence ?
Short answer: please post images of your complete rule and audit log details showing the rule execution. Those will help clarify what is happening.
More information...
That symptom is quite odd, and possibly from some another cause, based on the rule you describe. Instead maybe the audit log display order is wrong because the rule steps occur so quickly there is no measurable time difference to order the log.
Unlike branches, I do not believe if / else blocks process asynchronously and in parallel. That would definitely be in the documentation if it was the case, and otherwise I would expect thousands of customers to see rule timing errors continually.
There is an edge case of this symptom you describe: if there is a branch inside of an if / else block, we should expect no predictable order of steps from inside the branch relative to the rest of the rule.
We can confirm this if you please post an image of your complete automation rule, images of any relevant actions / conditions / branches, an image of the audit log details showing the rule execution, and explain what is not working as expected. Those will provide context for the community to offer ideas. Thanks!
Until we see that...
Based on the rule you describe, it is unclear to me why you are using two different if / else blocks. Instead the condition on user created could be immediately after the attempted create action.
Kind regards,
Bill
Can we use refetch component in your automation...
Refetch is something it will wait until the first action completes
The other option is to split the automation in to two or more as per your requirement.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Refetch was a good idea, although I was hitting the function limit so couldn't add a lot of extra refetches
I've now reworked it all to just have it in one main thread. which works but limits the error checking.
If I start getting issues I'll take another look at it
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.