Problem with checkout state of Workflow

Dave Clemmer
Mega Guru

So, I have two Workflows that are giving me a headache.  The second is a copy of the first.

 

The first has one Version, Published, but when I open it, it shows "Published (checked out by [me])".  Haven't figured out a way to do anything with this one.  The record in the Workflow Version table shows this one as having both the 'Checked Out' and 'Checked out by' fields empty.

 

The copy has two versions in the Version table.  One published, the other not.  When I try to open it, it opens the published version, but gives the dreaded message "Published (Checked out by )".  This one, I can open the unpublished version, do a 'Force Checkout', make whatever changes, then Publish.  That kind-of/sort-of works, in that the changes I make do show up in the editor's Published version, although the message at the top of that ("Published (Checked out by )") is still there.

 

The problem is, one or both seem to have a bug (or maybe there's a bug in 'Wait for Condition'?).

 

Doing the force checkout to put a log message at the beginning of the copy's Workflow shows that just investigating that workflow will not fix the bug, or even allowing debugging of that Workflow by itself.

 

So... I need to get rid of one or both of the Workflows, and edit the other (or create a new one that will be editable).  I am open to suggestions for how to do that.

2 REPLIES 2

Ankur Bawiskar
Tera Patron
Tera Patron

@Dave Clemmer 

Determining if a workflow is checked out by another user or if it is already published

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0538082 

please check in workflow versions who has checked it out

Steps below:

1) Navigate to Workflow->Administration->Workflow Versions

2) Search for your workflow with workflow name

3) You should see a record of your workflow checked out by another person.

4) Check with that person, if you can delete his version.

5) Impersonate to that person and then publish that workflow

6) Then you can checkout using your profile

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader

Ankur Bawiskar
Tera Patron
Tera Patron

@Dave Clemmer 

Steps for 1st workflow

1) Force Checkout via Context Menu:
Right-click the workflow in the list view → Select "Force Checkout" from the contextual menu. This bypasses the stuck checkout state.

2) Delete Orphaned Checked-Out Versions:
Navigate to wf_workflow_version table and filter for records where workflow matches your workflow name. Delete any unpublished, checked-out versions (ensure they’re not the published version).

3) Publish or Discard Changes:
After force checkout, either publish the workflow to finalize changes or delete the checked-out version to discard modification

Steps for 2nd workflow

1) Force Checkout the Unpublished Version:
Open the unpublished version → Use "Force Checkout" from the context menu.

2) Validate Subflows:
Ensure all subflows referenced in the workflow are valid (not checked out, inactive, or deleted). Check the wf_workflow_version table for subflow issues.

3) Publish and Clean Up:
After editing, publish the workflow. Delete the old unpublished version if it’s no longer needed

If my response helped please mark it correct and close the thread so that it benefits future readers.

Regards,
Ankur
Certified Technical Architect  ||  9x ServiceNow MVP  ||  ServiceNow Community Leader