we need to give the approvals for Knowledge article before publish based on the category?

Deepika61
Tera Contributor

Hi All,

Actually For one knowledge base we have some categories, so for that every category  , we have approver, So whenever we submit article for this KB, before publish we need approval based on the category? 

Please help to complete this

Thanks

Deepika

1 ACCEPTED SOLUTION

Hi you dont need to modify OOB Script include. You can handle this in workflow.

In knowledge approval workflow before Approval user Activity. You can add a IF condition to check your knowledge base sys id which needs to go for category approval . If yes in the next activity you can add a approval user activity to push the approvers based on categories. If knowedge base is not matched. you can use existing flow to connect.

Refer attached screenshot for sample

If activity script:

  answer = ifScript();


  function ifScript() {
        var kBase = current.kb_knowledge_base;
      gs.info("KBASE"+kBase);
     if (kBase == 'a7e8a78bff0221009b20ffffffffff17') { //KnowledgeBAse sysid
        return 'yes';
     }
     return 'no';
  }

 

Approval User Script:

 answer = [];
   if(current.kb_category == 'ed1c2552ff0131009b20ffffffffff65') // category name
       answer.push('1c8c17a307010110f1cbf48f7c1ed089'); // usersysid

Regards
Harish

View solution in original post

5 REPLIES 5

use the below in Approver user activity

answer.push(current.fieldname); 

Regards
Harish