cancel
Showing results for 
Search instead for 
Did you mean: 
Daniel_Quill
Elite Collaborator
Elite Collaborator

For years the Collaboration functionality has been used to allow groups of people to work closely on a living or other documents without the need to schedule meeting or wait for someone to be available to discuss.  However, what happens when a document is removed from the system and replaced or supplemented with a new document of the same relevance.  Currently, if a document is removed from OnBase, the discussion threads that have been attached to that document are also removed.  So, with the release of OnBase 14, a document can be removed, replaced, or even supplemented with another document and all of the current collaboration that has been done can be shifted to another document so all that previous work can continue with a new document.

Implementation

To resolve the above mentioned problem of possibly losing the correspondence on documents created through Collaboration a new method to the Collaboration object called CopyDiscussionThreads has been created.  This is a standalone method that accepts a source document object that contains the collaboration threads and target document that will be receiving the collaboration threads.

Example

Let's check out some real code to make sense of the above. I'm first going to retrieve the source and target documents objects.

Document sourceDocument = obApplication.Core.GetDocumentByID(sourceDocumentID);
if ( sourceDocument == null )
{
return;
}

Document targetDocument = obApplication.Core.GetDocumentByID(targetDocumentID);
if ( targetDocument == null )
{
return;
}

Once we have the source and target documents, we will create a basic Collaboration object.

Hyland.Unity.Collaboration.Collaboration collaboration = app.Collaboration;

Finally, we will copy the source document's collaboration thread over to the new document

collaboration.CopyDiscussionThreads(sourceDocument, targetDocument); 

Specifics

First, when using this method you will notice that it does not return any type of notification whether it was completed successfully.  This is by design.  If the action of the method fails there will be an exception thrown that can be caught and handled by a TRY...CATCH block.  Otherwise, if there was not an exception thrown it can be assumed that the copy of the threads was performed successfully.

Secondly, this method is used to copy all of the threads from a document.  There currently no functionality that will allow the copying of specific or filtered threads.

In Conclusion

This functionality is a powerful and helpful edition to the Collaboration arsenal of API functionality.  It provides additional flexibility when discussion threads are relevant to multiple documents.

Be sure and leave us a comment below if you have any questions/concerns or just want to talk about the feature. Next time, we'll be talking about our new processor batch API in the Unity API.