Stop a Business Rule from executing

thisisauniqueus
Giga Expert

Hi,

I have a setup where i am receiving REST request from 3rd party, i have used scripted REST API, and in response to incoming request i create/update a Demand ticket. So far so good. For send back updates i have created an update BR and using REST Message to send the updates back to 3rd party.

The problem is when the 3rd party sends an update request the BR is also triggered which should only be triggering when the updates are made in my instance. I have tried using

gr.setWorkFlow(false);

in the script to update the ticket from 3rd party, but that stops the additional comments and all the journal input fields to be updated, because i guess the journal fields are populated using a BR too. So my question is how can i make the BR to fire only when the update is made directly from the form NOT from the scripted REST API script?

Any help in this regards is appreciated. Kindly let me know if you need any additional information.

Regards,

JS

20 REPLIES 20

Hi John,



The was authored by michael.ritchie - let's see what he knows.


John, that is a server side java class.   What exactly are you trying to accomplish?   I am not sure I follow your question.


Hi michael.ritchie,



Is there an onComplete method of this java class? I am trying to insert data in the staging table (that extends Import Set Row) and then runing the transform map. I want to get the response of the transform map run. I that possible using GlideImportSetTransformerWorker class?



Regards


John, I honestly don't know.   I found this code on the community in the past and have leveraged it for several solutions.   The class does have "setBackground" and in your snippet it is flagged as true so maybe try not setting that to see if it will work for you.   You may also try creating a new post on the community specific to this question and maybe others know.


will do so, thanks for your time



Regards