Applying New workflow version to old records/workflow

kduong
Giga Contributor

Is it possible to apply the latest workflow version to old records/workflow?

I know there is a way to restart the workflow. Am I correct in saying that the restart workflow will restart the current workflow associated with the record? meaning it will restart the old workflow?

1 ACCEPTED SOLUTION

HI Ken,



I don't have script handy. Please refer below link on how you can restart workflow.


Workflow Script - ServiceNow Wiki


View solution in original post

11 REPLIES 11

kduong
Giga Contributor

Thanks Goran,



We want the new workflow to start from the beginning. We have asked users to submit a new request but it has become difficult to manage due to the nature of their request.



The link does not appear to work for me it just takes me to the developer page.


weird,



But go to developer.servicenow.com and search for "startflow". Then you would get a hit with "example" etc. If you click on that you get to the right point.



Other way is to go the the site, click on "API" and then "Server". Then you scroll down your menu on the left to "workflow" and expand that to see all the good stuff you got with workflows. I really like this "API" link, you can find a lot of your answers there and most of them have very good examples as well.



If you want to look more how ServiceNow starts it in scripts. You can go to Script Include, look at the one called "KBWorkflowSNC" and scroll down abit to "startWorkflow". There is the code how they start workflows connected to a knowledge article. The UI Action "Publish" is using this Script include to do the magic.



Let me know if you hit a wall



//Göran


kduong
Giga Contributor

Thanks,



Will test this out.


Hi Ken,



You can also refer to section 3.2 script as mentioned in my previous link.


Yes that the exact one I was going to try and test. It seems like the only one that meets my requirements.