What this statement mean "new KBWorkflow().startWorkflow(current, "workflow");" in script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2022 03:44 AM
Hi ,
can someone explain why this statement can be used in script
new KBWorkflow().startWorkflow(current, "workflow");
what exactly this will give the result?
- Labels:
-
Multiple Versions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2022 03:51 AM
Hello
The above statement is to call a script include in workflow or BR or reference qualifier.
For the statment [new KBWorkflow().startWorkflow(current, "workflow");]
KBWorkflow - script include name
startWorkflow - Function in the SI
current, "workflow" - are the parameters.
The full statement will return the results to Restart Knowledge workflow using script in servicenow
Mark it helpful or correct, If Applicable
Cheers..!
Happy Learning:)
Tushar
Cheers..!
Happy Learning:)
Tushar
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-02-2022 03:56 AM
if (current.sys_updated_by == "AUTOKMIMPORT") {
if (current.kb_knowledge_base.kb_version == "3") {
new KBWorkflow().startWorkflow(current, "workflow");
current.update();
}
}
}
this is the code