cancel
Showing results for 
Search instead for 
Did you mean: 

Unity API -- removing a document from a lifecycle

Rick_Danley
Champ in-the-making
Champ in-the-making

Is there a way to remove a document from a life cycle using the Unity API?  I'm looking for something that's opposite of Application.Workflow.AddDocumentToLifeCycle().

Thanks.

8 REPLIES 8

Rick_Danley
Champ in-the-making
Champ in-the-making

Thanks Tim,

That explains why I'm not finding it in OnBase 11.

Rick

Joseph_Malecki
Confirmed Champ
Confirmed Champ

Thank you for this Hyland!

Prior to v13, we came up with a clunky but functional method for removing documents from workflow. What we did was to create a User Task that would remove the document from the queue, life cycle, etc. Then from within the Unity API, we could execute that task against the current document. As I said, this worked well but it required that this (or a similar user task) be added to every workflow queue from which we might want to remove the document. 

Perhaps food for thought for folks on versions below 13.

Shane_Cook
Star Contributor
Star Contributor

More food for thought. You could create a single "Exit" queue that does nothing more than immediately remove the document from the life cycle.  For those using OnBase 12 and earlier, the document could be transitioned to the "Exit" queue to accomplish your goal?  It should eliminate the need for the adhoc task for each queue.

Daniel_Quill
Elite Collaborator
Elite Collaborator

Mike,

 

You cannot get the list of LifeCyles for a document but you can get all the queues a document is present in.

 

https://sdk.onbase.com/unitySDK/html/0dd3b9eb-d2c7-d650-ad23-f52fe5c3d30f.htm

 

Once you have the QueueList  from the document you can loop through them and find the LifeCycles each Queue is assigned.

 

https://sdk.onbase.com/unitySDK/html/5ff5321d-e656-eaf9-738a-5f68a9f5b630.htm