Notification triggering twice

SNow35
Giga Guru

Hello,

I have a knowledge notification which should be sent to author of the article whenever the approver rejects it. I have created an event and triggering it in after update business rule.

Created a notification and checked event param 1 and send to event creator checkbox, now the notification is going twice when the article is rejected. Please let me know if I need to make any other changes.

Thanks in advance.

1 ACCEPTED SOLUTION

Hello,

I want to get the rejection comments in the notification which is available on the approval table, if I trigger the event from workflow I wont be able to populate the comments.

Do you have any thought on how this can be populated while triggering it from workflow.

 

View solution in original post

14 REPLIES 14

Yes the business rule is running twice and the event is triggered twice, but I have the condition in after update business rule that it should only trigger when source table is kb_knowledge and if the state changes to rejected.

can you share the BR script with condition?

Regards
Harish

find_real_file.png

 

find_real_file.png

 

can you place line number 12 to 14 inside if and try?

 

Regards
Harish

I have replicated in my personal dev. It works fine for me. Here is the logic I used

COndition same as yours

Script:

(function executeRule(current, previous /*null when async*/) {
var rec= current.document_id;
var kn ='';
var gr = new GlideRecord('kb_knowledge');
gr.addQuery('sys_id',rec);
gr.query();
if(gr.next())
{
//kn = gr.kb_knowledge_base;
}
gs.eventQueue('approval.rejected',current,current.document_id.author);

I used OOB event just for testing
})(current, previous);

Regards
Harish