How can I clean up obsolete workflows and tasks?

1
Dear all, Anyone an idea about how to clean up a workflow and its usertasks which have become obsolete? I will explain my question with my use case: A document needs to be approved. Before it ends up in the approvers inbox it is first validated within the workflow and other users might get user tasks assigned in completing the document properly. After that phase the approver receives a workflow task for approval. Now the requestor decides to completely change the document before it gets approved. The complete document must be validated and completed again before the approver is allowed to approve. The approver task gets obsolete. In fact the complete workflow becomes obsolete and I want to start a completely new workflow for this document. As I can only have 1 active workflow the obsolete workflowinstance and tasks are not associated to my workflowcontext anymore and the approver receives an ugly system error when he/she does try to complete the task (as it is still assigned to the approver or any other user). Actually I want to remove all possible obsolete user tasks and workflowinstances before starting a new workflow. I have thought of setting an ‘obsolete’ outcome for all possible usertasks, which I then can use to trigger the workflow to end. But that feels like a little over enginering for each user task/workflow. Any other suggestions?  Update: tried the ‘obsolete outcome solution’ as mentioned above. This works, but now you'll have to create a subflow for each possible task to set the outcome, otherwise you'll get the error: All ‘complete task’ actions should have an outcome selected from the same user task. Still up for other solutions though as this becomes a thing that is ‘easy to forget’ during developing new workflows and/or new user tasks! Thanks for helping out!
asked
1 answers
0

Hi Joost,

 

We are aware of this limitation and there is a story on our backlog to make the cleanup process better, so stay tuned for that in one of the upcoming releases. In the mean time, I believe something like this should do the trick? If not, could you please explain why so I can help come up with another workaround?

 

(I don’t understand how images work on the forum, please save it to your machine to see the full version)

 

Kind regards,

Jef Hellemans

answered