setWorkflow(false) use in business rule

VullankiL
Tera Contributor

Hi 

I have one scenario, where I am using setWorkflow(false).

 

VullankiL_0-1736767804068.png

 

But in my case, there is no workflow associated with the table. But I want to stop executing remaining business rules associated with it. (Because there is another business rule that can abort this cancel action) Can I use it or not? Is there is any other option to stop execution of other business rules in this case?

Thank you

17 REPLIES 17

Anurag Tripathi
Mega Patron
Mega Patron

Hi,

setWorkflow(false) stops execution of business rules only for the given transaction, don't get confused with the usage of name workflow in it.

 

-Anurag

Hi @Anurag Tripathi 

Even after using setWorkflow(false) in my business rule, it is executing another business rule (to abort cancel action). I don't want to execute it.
I am writing the current business rule for Assessment instances table (Global scope). But the updating record is in another scope (scoped). And setWorkflow(false) showing some security constraints. How can I solve it? please let me know..

Thank you,

You have to check the order in which the BRs are running, your BR (which has setWorlflow false)should run before the other one to ensure that it doesn't run.

-Anurag

Thank you for the reply @Anurag Tripathi ,

But it is showing security access constraints like 

VullankiL_0-1736770094775.png