BR updating state twice

klavan32
Tera Contributor

Hi All,

 

We have a before update BR where, if the state is in awaiting user and if changes made by requested by /for , state should be updated to WIP automatically.

 

But this is posting the state journal twice in activity which is affecting some reports.

klavan32_1-1750730582696.pngklavan32_2-1750730601124.png

 

klavan32_0-1750730544004.png

 

9 REPLIES 9

Chaitanya ILCR
Kilo Patron

Hi @klavan32 ,

 

Use script tracer to see if any other business rules are running (only synchronous ones)

 

Here is the YouTube video on how to use it

https://youtu.be/m6Jg4JuVpIQ?si=pPIy7UtIDYPc-9BI

 

 

Regards 

Chaitanya 

Hi @Chaitanya ILCR Thank you, i have tried using tracer, i can see br is invoked twice once at line 35 and again at line 70, is this could be the reason?

Hi @klavan32 ,

 

try see it's invoked twice is there is any current.update statement in any of the BRs involved?

if yes if they are a Before BRs remove the current.update statement

if they are after/async try to put proper filter condition/condtions

 

most of the time current.update is the cause of these kind of behaviors

 

 

Please mark my answer as helpful/correct if it resolves your query.

Regards,
Chaitanya

Hi @Chaitanya ILCR 

advanced tab is not enable, no script written, it is before update BR with filter conditions and action to be performed

Hi @klavan32 ,

it's not the mentioned BR 

it's the other BRs which are making it run twice

you can find out the other BRs using the script tracer

 

open each BR that's triggered as part this update and check (I would say look for current.update statements 1st) and update those BRs which are making the mentioned BR twice

 

also try and add one more condition that state!=work in progress(try this first and check the above steps if this doesn't work)

 

Please mark my answer as helpful/correct if it resolves your query.

Regards,
Chaitanya