The CreatorCon Call for Content is officially open! Get started here.

How to remove a checked out workflow version?

peterraeves
Mega Guru

I just noticed that I checked out a workflow 3 months ago. The problem at that time had been solved by changing a Business Rule. The workflow wasn't at fault at that time. I don't remember what changes I have done to the workflow, so I don't want to publish it, but i don't want the published version to exist either. How do i close the workflow again, without having to publish it?

1 ACCEPTED SOLUTION

peterraeves
Mega Guru

With all your help combined I figured it out. If you want to delete a checked out published version you:


- Do NOT need to be the person that checked out the version


- Do NOT have to publish it first


- Do need a workflow role (creator or publisher). Admin alone isn't enough as the ACL doesn't have admin override.


- Do need to close all active workflow contexts



When this is all done, you can delete the workflow version just fine.


View solution in original post

16 REPLIES 16

gowthamanbalu
Tera Contributor

You can get that workflow version deleted by running the below script in the script background. Please make sure you copy the right sys_id of checked out workflow in the highlighted portion.



var wf= new GlideRecord('wf_workflow_version')


wf.addQuery('sys_id', 'sys_id_your checked out workflow');


wf.query();


while (wf.next()){


gs.print('Name:'+ wf.name);


wf.deleteRecord();


gs.print('deleted:'+ wf.name);


wf.update();}



Regards,


Gowthaman Balu.


Winston
Tera Guru

In Orlando I wasn't able to delete it from the workflow editor or from the list view. I was able to pick up where I left off by clicking the Checked Out tab on the workflow editor

 

find_real_file.png