How to properly unpublish a workflow

kungfuu72
Giga Expert

With the Boolean values and 2 fields, Active and Published, this comes to be 4 possible combinations of values.

Between the many combinations of Active (true or false) and Published (true or false), what is the proper way to "unpublish" a workflow?

I've seen the note that active contexts for a workflow must be completed or killed before the workflow version can be unpublished (published = false).

And it appears that previous versions of the workflow are Active (active = true) and Unpublished (published = false).

Of course there are also workflows that we have that are Published (published = true) and Inactive (active = false)

This condition (in red here) is probably the one's that I want to look at to have Unpublished (published = false) and Deactivated (active = false).

How are others "decommissioning" old workflows in their environment? And what is the "proper" way to do this?

1 ACCEPTED SOLUTION

Hi Daniel,



I believe the proper way to do this is to:



1.   Enter Workflow Editor


2.   Checkout the workflow you want to Unpublish/Inactivate


3.   Select "Set Inactive" from the menu (under the Hamburger icon at top left).


4.   Publish the workflow



Doing so caused the existing Workflow Version to go Unpublished/Active, and created a new Workflow Version which was Published/Inactive.



I had the "Set Inactive" option available in the Hamburger menu even before I checked out the workflow, so it's very possible I could have just Inactivated it without checking it out and re-publishing -- that's probably what created the new version that then became Published/Inactive.



Either way, my duplicate workflow that I wanted to retire no longer shows up in the search bar on the Workflow Editor.


View solution in original post

8 REPLIES 8

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hi Daniel,



So basically if you create a workflow on dev instance and it is not published then it will only trigger the workflow for the request raised by you. However for other request raised by someone on dev instance it will not trigger the workflow which is not published.



You can mark the active to false by going to the table wf_workflow_version


kungfuu72
Giga Expert

Yea, I'm not talking about workflows being created or even looking at workflows that are checked out by me or anyone else.



I'm talking about workflows that are old and inactive (the latest version) but are still published.


Hi Daniel,



I believe the proper way to do this is to:



1.   Enter Workflow Editor


2.   Checkout the workflow you want to Unpublish/Inactivate


3.   Select "Set Inactive" from the menu (under the Hamburger icon at top left).


4.   Publish the workflow



Doing so caused the existing Workflow Version to go Unpublished/Active, and created a new Workflow Version which was Published/Inactive.



I had the "Set Inactive" option available in the Hamburger menu even before I checked out the workflow, so it's very possible I could have just Inactivated it without checking it out and re-publishing -- that's probably what created the new version that then became Published/Inactive.



Either way, my duplicate workflow that I wanted to retire no longer shows up in the search bar on the Workflow Editor.


This worked for me!!   Thanks so much. I needed to clean mine up badly.