Send second approval when KB article workflow is in Review for KB article.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2023 07:24 PM - edited 12-11-2023 07:55 PM
I have configured 1st approval notification that will trigger when the workflow changes to review on KB article.
How to trigger 2nd approval notification to particular group, when the 1st approval is approved in same state(Workflow is Review) for KB article?
Created After Insert Business Rule on 'sysapproval_approver' table with Source Table as 'kb_knowledge' condition, still email is not triggering.
var ga = new GlideRecord('sysapproval_approver');
ga.addQuery('document_id', current.document_id);
ga.addQuery('state', 'approved');
ga.query();
while (ga.next()) {
var grp = '2123abc'; //SysID of KB Managers Group
var arr = [];
var gr = new GlideRecord('sys_user_grmember');
gr.addQuery('group', grp);
gr.query();
while (gr.next()) {
arr.push(gr.getValue('user'));
}
gs.eventQueue('knowledge.km.approval', current, arr);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-11-2023 08:20 PM
HI @Admin7267 ,
In Knowledge base, clone the publish workflow and add your approval step after the first level of approval.
This will be applicable for all the articles in that knowledge base.
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-12-2023 04:22 AM
Hi @Admin7267
No need to write the code for this. The Approvals has been configured in Workflows and workflows has been added in knowledge base. So,in your case, take publish workflow, make a copy and add the another approval ,, also update the workflow name in Knowledge base.
If my response proves useful, please indicate its helpfulness by selecting " Accept as Solution" and " Helpful." This action benefits both the community and me.
Regards
Dr. Atul G. - Learn N Grow Together
ServiceNow Techno - Functional Trainer
LinkedIn: https://www.linkedin.com/in/dratulgrover
YouTube: https://www.youtube.com/@LearnNGrowTogetherwithAtulG
Topmate: https://topmate.io/atul_grover_lng [ Connect for 1-1 Session]
****************************************************************************************************************