Aborting the Business Rule when UI action runs.

AnandKumar1
Tera Expert

HI,

 

Can someone help how to stop the business rule when user initiate the UI action.

 

My scenario is, when user trying to close the task close complete then new task will get created. Other Option we have given create task to PKI team. Which is also do same activity. 

 

Now, if user click the UI action, Business rule is also getting executed and 2 tasks are getting created.. 

 

Thanks.

 

 

6 REPLIES 6

johnfeist
Mega Sage
Mega Sage

Hi AnandKumar,

 

I don't know that you can "ignore" one business rule.  The normal approach would be to update the execution criteria.  In this case, possibly start the script by checking if the a new task has been created within the last second or two and if true, don't create an additional one.

Hope that helps.

:{)

Helpful and Correct tags are appreciated and help others to find information faster

Amit Pandey
Kilo Sage

Hi @AnandKumar1 

 

You can use setWorkflow(false) in the UI Action. This will not only stop BRs but also the notifications and workflow. 

 

Please mark my answer helpful and correct.

 

Regards,

Amit

AnandKumar1
Tera Expert

Thank you both for the suggestion.  I planning to do this to bring solution. Please provide your valuable feedback 

 

When i initate the UI action to from task1 to create the task 2. 

 

Firstly, i am making the task 1 custom field "check" to false and followed that creating the task 2. 

 

In business rule, I will add the condition to trigger the status is closed complete and check is true with order value 500.  

 

Thanks. 

Hi AnandKumar,

 

Your description sounds like it should work.  If you only need to stop one BR but let the others run, then you are on the right track.  If you want to skip all BRs then AMit Pandy's suggestion above will be the most efficient.

Hope that helps.

:{)

Helpful and Correct tags are appreciated and help others to find information faster