How do I permanently delete a workflow...?

davekox
Kilo Explorer

Seems like a silly question, I know, but there is no "Delete" option except for Checked out versions of workflows. I have several inactive workflows which need to be deleted in order to clean up the list.

12 REPLIES 12

davekox
Kilo Explorer

I opened a ticket on HI and have been told that there is no way to delete a workflow on the Berlin release, which is what we're on. Not what I wanted to hear. I've renamed all inactive workflows with a preceding "Z" in order to move them all to the bottom of the list. Still not happy about it.


munny
Kilo Explorer

I was just experimenting different ways to delete the workflows and found out that you have to go to the workflow properties to delete it. These are the steps:

1/ Open workflow editor
2/ Open the workflow you want to delete
3/ Click the cogwheel and select properties
4/ Click the delete button and it will ask you to confirm the deletion in a prompt box.

note: you might need to set the workflow to inactive first.


Benjamin22
ServiceNow Employee
ServiceNow Employee

The thing with workflows is in order to delete them:

* They must not be active no workflow contexts active

* You must be in the same application scope

* The workflow is not check out already.

 

That should be the list of prerequisites as I know them.

sethivarun
Kilo Guru

deleteWorkflow(GlideRecord current)

 

Example

 

//where current is a task record with a workflow context
      var wkfw = new Workflow();
      wkfw.deleteWorkflow(current);

 

This will help you delete the workflows. I know this because I accidenlty deleted all the change workflows and then had to zboot the developers instance

will this delete only the current workflow or all the workflows?