How to stop other business rules if the first business rule is aborted

alokims
Tera Contributor

Hi,

 

I have multiple before business rules with different orders. I want if any lower order business rule is abort then stop to execute all higher order business rule.

 

 

Thanks, Alok

8 REPLIES 8

Rohit  Singh
Mega Sage

Hi @alokims ,

 

You can use setWorkFlow(false) in your BR having the lowest order which will stop any BR which has to be executed after that.

 

If my response helped, then please mark it helpful and accept the solution.

 

Regards,

Rohit

@Rohit Singh Thanks for your reply.

 

SetWorkflow is not working.

 

Thanks, Alok

Hi @alokims ,

 

Can you share your BR code snap?

 

 

(function executeRule(current, previous /*null when async*/) {

    // Add your code here

    current.setAbortAction(true);   
    current.setWorkflow(false);
   

})(current, previous);