cancel
Showing results for 
Search instead for 
Did you mean: 

Unity and OnBase Upgrade 9.2-12

Jason_Brownlow
Champ on-the-rise
Champ on-the-rise

My organization is planing to Upgrade to 12 from 9.2.  We have a 3rd party application that uses Untiy to present documents to customers online.  I'm looking for information on any changes between the Unity API for these two versions that might impact our document retrieval.  The code is fairly basic document retrieval based on a few keywords.  While I expect there will be no real change the API the process of confirming this is pushing deadlines for the upgrade.  Can anyone direct me to the appropriate documentation or give me a quick rundown of any potential differences in the versions? 

8 REPLIES 8

Timothy_Cosgrif
Star Collaborator
Star Collaborator

[quote user="John Anderson"]

If you're returning documents back from the application, depending on how you did it, you may run into issues. For instance, if you were doing something like this:

Dim byteData As Byte() = New Byte(pageData.Stream.Length - 1) {}
pageData.Stream.Read(byteData, 0, pageData.Stream.Length)

That code worked in 9.2 but will not work in 12. You can't read directly from the pagedata stream anymore, at least not like that. There are more details in this thread: https://www.hyland.com/community/technical_communities/onbase_apis/f/10815/p/9810/17549.aspx

This has been fixed as of build 12.0.1.93. The Length property will now return the correct value so long as it is accessed before the stream is read. It is also worth noting that this will cost an additional web request to be executed.

If you want to read the PageData.Stream into another local stream, we suggest reading in small chunks so that larger documents byte data don't get thrown into the Large Object Heap (there is a C# example for how to do this in the referenced thread).

Seth_Yantiss
Star Collaborator
Star Collaborator

I can tell you that between version 10 and version 12 adding currency keyword values changed.  Not that this has a thing to do with retrieval. 

In version 10 we were using the API to create a document in OnBase, then add several keyword values.  One such value is a currency value.  SQL currency value defaults to a 4 decimal place number.  When we passed this through, OnBase would truncate to 2 decimal places.  Hyland, correctly, considered this to be a data loss event and corrected it somewhere between 10 and 12 by disallowing currency values with more than 2 decimal places*.

We had to fix our code to handle the transformation of the currency value (either truncating to 2 or rounding to 2) prior to posting it as a keyword.

*I have to admit to still be scratching my head on the "resolution".  Rather than expand the decimals accepted to the industry norm (4)... 

Cheers,
Seth

John_Anderson4
Star Collaborator
Star Collaborator

Tim, I'm pretty sure I tried it in 12.0.1.101 and it didn't work, but I can't say with 100% certainty.

Jason_Brownlow
Champ on-the-rise
Champ on-the-rise

Many thanks to all who answered the question.  Here is a bit mroe information in response to the reply that said more info or code would help answer this.

Also an error correction:  the version change is 8 to 12 not 9 to12 as originally stated in the post.

We require documentation around the changes in Onbase from R8.02 to R12.0.1 at a HL and specifically if any of the Onbase calls below have changed between these versions:

DocumentQuery.CreateDocumentQuery()
DocumentQuery.DocumentTypes.Find()
DocumentQuery.AddDocumentType()
DocumentQuery.AddKeyword()
DocumentQuery.Execute()
Core.GetDocumentByID()
PageRangeSet.AddRange()
ImageDataProvider.GetPages()

Core.GetDocumentByID()
PDFDataProvider.GetDocument()

DocumentQuery.CreateDocumentQuery()
DocumentQuery.DocumentTypes.Find()
DocumentQuery.AddDocumentType()
Core.KeywordTypes.Find()
KeywordType.CreateKeyword()
DocumentQuery.AddKeyword()
DocumentQuery.Execute()

Unity Session Management:
Hyland.Unity.Application.Connect()