ServiceNow: How to create a workflow that runs on incident update?

喜你入骨 提交于 2019-12-06 14:45:27

You would need to create a business rule on the Incident table that would call your workflow each time there is an update:

var updateOwner = new GlideRecord('wf_workflow');
updateOwner.addQuery('name', '<workflow_name>');
updateOwner.query();
if (updateOwner.next()) {
   var wf = new Workflow();
   var workflowId = '' + updateOwner.sys_id;
   var vars = {};
   wf.startFlow(workflowId, current, current.operation, vars);
   gs.addInfoMessage('Workflow initiated.');
}
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!