Rule runs in parallel. Add rules into Rule chain for sequential run

  • 3
  • Article
  • Updated 8 months ago
Rule Run Order
Earlier behaviour : Rules / Rule Chain were running in the order they were scheduled and only one rule run per tenant was running and the other are just queued up. So when you had the rules scheduled to run at 12:01, 12:02 and 12:03 this was running in the respective order.

This was causing a huge backlog in the queue and when there were historical runs it was causing several hours delay in rules completion and in some scenarios many days where techops team had to intervene and abort it.

Current behaviour : Rules may run in parallel. We have a cool dependency analysis infra, which will evaluate whether two rules can run in parallel or not by looking at the objects that they are writing into and reading from. This makes sure admin need not analyse and put all the CTA creation rules in a chain or when you are moving the data from Object A --> to Object B --> Object C this will run in the order if was scheduled to run at 12:01, 12:02 and 12:03 in respective order.

This makes sure the rules are executed faster by reducing the wait time in queue and also the manual rule runs have higher priority than any of the scheduled ones. This has enabled us to increase the frequency of the rules in Summer release and will follow with rule chain in Fall release.

What should you do :
If you have some rules that need to run in order at any cost or if you have rule that write to an Object like Contact in salesforce has triggers that impact other objects then Gainsight would not be able to detect the dependency and you need to put the rules in a rule chain to mandate the order.
Photo of Sundar

Sundar, Employee

  • 11,178 Points 10k badge 2x thumb

Posted 8 months ago

  • 3
Photo of Scott Drost

Scott Drost, Senior Solutions Architect

  • 3,608 Points 3k badge 2x thumb
Sundar - just want to confirm that the entire rule chains themselves run in mandated order as well.

Example: I schedule Rule Chain #1 and Rule Chain #2 to run 1 minute apart. 

However, all 20 rules in Rule Chain #1 will run, in order, first.  Then, when rule number 20 in Rule Chain #1 is complete, only then does the first rule in Rule Chain #2 run.  

Then, as you noted, the rules in Rule Chain #2 will run in mandated order in the chain.

I have that correct, yes? Let me know - thanks!
Photo of Lucas Schuelter

Lucas Schuelter

  • 112 Points 100 badge 2x thumb
Like I said to Kevin at the ticket we opened because our rules ran out of the scheduling order:

If we can not be guaranteed that the rules and rule chains will be executed in the exact order that we scheduled, it seems impossible to organize such big data management operation like ours.

In our point of view, our data management requires a more predictable order of execution.