Restart Workflow for one REQ or RITM

Steven Parker
Giga Sage

Hi Guys,

Is there a simple Business Rule for restarting a workflow on one particular REQ or RITM?

In the event we find an issue, something is incorrect, etc...can you just restart a workflow on one particular Request is what I am looking for.

I've seen this code, but not sure how to use it for one particular item:

new WorkflowApprovalUtils().cancelAll(current, comment);

new Workflow().restartWorkflow(current);

If anyone has a script example that would be great!


Please mark this response as correct and/or helpful if it assisted you with your question.
Steven
5 REPLIES 5

Goran WitchDoc
ServiceNow Employee
ServiceNow Employee

Hi,



There is a OOB Business rule you can look at. It's for Change Requests, but doesn't really matter when you wanna see how it works.


Here is a link to the BR:
https://YOUR_INSTANCE.service-now.com/sys_script.do?sys_id=210c95650a0a0b26533c32cc0cdfb045&sysparm_...



//Göran