Business Rule Not Triggering - Assistance on Why?

jlaps
Kilo Sage

I am trying to account for a delay in comment generation where the comments/variables are getting sent to a 3rd party via an interconnect API. I need to generate a comment on the task AFTER the correlation ID is set, as the comments getting sent before are not getting sent properly as the correlation ID is still being generated. Any comment sent later will include full payload, so I just need to add a comment after the correlation ID gets filled in.

jlaps_0-1707410906434.png

jlaps_2-1707410945123.png

 

jlaps_3-1707410971632.png

 

Neither the status change (which is only there to check if its working) nor the comment are getting added. 

 

jlaps_4-1707411033441.png

The audit history shows the field getting updated from blank.

 

What am I doing wrong? I have tried before/after, tried alternate comment add script lines.

Thanks!

1 ACCEPTED SOLUTION

Sid_Takali
Kilo Patron
Kilo Patron

Hi @jlaps make it before Update BR and give value to condition Correlation ID Changes From or make it Correlation ID Changes.

 

Regards,

Siddharam

View solution in original post

5 REPLIES 5

Sandeep Rajput
Tera Patron
Tera Patron

@jlaps You are trying to set the comment field in an After business rule, since the after business rule runs after the data is already saved in database hence any changes on the tables fields (comments in this case) would not get saved unless current.update() is used. Ideally current.update() should be avoided in after business rule, but if you still need to user it then user it in conjunction with current.setWorkflow(false);

 

example 

 

current.setWorkflow(false);
current.update();

 

Hope this helps.