Instant-publish for Knowledge article from Record Producer

Lisa Holenstein
ServiceNow Employee
ServiceNow Employee

Hello community,

I hope to find help with my issue. I created a record producer to generate a knowledge article. I want these articles to be instantly published, but they are always generated in workflow state "Draft".

I have already tried the following, but nothing helped:

  1. I have set the publish workflow for the Database to "Knowledge - Instant Publish" (OOTB workflow).
  2. I have a Knowledge Template in the record producers Tab "Generated Record Data", where I have set the field kb_knowledge.workflow_state to "Published"
  3. I have tried scripting the field like this: kb_knowledge.workflow_state = 'published';

Now I'm really out of ideas and hope, someone can tell me how to configure the record producer.

Thank you very much,

Lisa Holenstein



Have questions about the Now Platform? Join our bi-weekly Platform Academy.
1 ACCEPTED SOLUTION

At the SNUG meeting in Cologne yesterday, I got an answer to this question. Apparently there's a business rule "Set article in draft state on insert", which is responisble for this behaviour. I will change this with either a changed copy of this business rule or preparing a scheduled job to have the articles published.



Kind regards,


Lisa




Have questions about the Now Platform? Join our bi-weekly Platform Academy.

View solution in original post

3 REPLIES 3

Brad Tilton
ServiceNow Employee
ServiceNow Employee

Hi Lisa,



I think you probably want to set the state to review, and that will kick off the workflow. In your record producer script you should be able to do:



current.workflow_state = 'review';



If that doesn't work please post your current record producer script.


Hi Brad,



thanks for your quick answer, unfortunately it didn't work.


I don't have much of a script actually, only the one line for the workflow_state that you posted.



find_real_file.png


find_real_file.png


find_real_file.png


find_real_file.png


find_real_file.png



As you can see, I did not change anything in the approval. I have already tried setting the workflows_stage to "draft", but that did not change anything.



Thank you,


Lisa




Have questions about the Now Platform? Join our bi-weekly Platform Academy.

At the SNUG meeting in Cologne yesterday, I got an answer to this question. Apparently there's a business rule "Set article in draft state on insert", which is responisble for this behaviour. I will change this with either a changed copy of this business rule or preparing a scheduled job to have the articles published.



Kind regards,


Lisa




Have questions about the Now Platform? Join our bi-weekly Platform Academy.