cancel
Showing results for 
Search instead for 
Did you mean: 

Hyland Unity API

Dale_Meyer
Champ in-the-making
Champ in-the-making

We are currently running a custom desktop application (using .NET framework and WPF) alongside the OnBase/Unity client. We use the Unity API to retrieve and display the list of OnBase documents in our application. The application uses the right DLLs to open a specific OnBase document in the OnBase client (initiated from our application).

We are currently revamping our custom application to be a web based application and will no longer be able to use the  DLLs that we currently use to open the OnBase document in the thick client. From our research, we found that the process of opening a document in the Unity client can be initiated using an Hyperlink (see below) that is available for each document in the Unity client.

 

An example of such a hyperlink to the document is:

 

onbase://document/view/?DocID=3923754&Sig=9gIPIqbs9bYHI3WLujV_dNr0axF-v85rFNI_5gCcRhg~

 

The hyperlink has a general pattern to it and we recognize the DocID. But we are not sure how and where the Sig is coming from. We would like to know if there is currently an API call that we can utilize to either retrieve this hyperlink as a whole or the Sig value for a document so that we can dynamically create the hyperlink.

 

Please note that we are not trying to display the document in our custom application but to just initiate the call to open the document in the Unity client from out application.

 

Our search in the OnBase database to find a table that stores the Sig value was unsuccessful. So, would really like to know if this is the right approach or if there is a another feature that can be utilized for what we are trying to achieve.

4 REPLIES 4

Jeffrey_Seaman
Star Contributor
Star Contributor

There are extension methods to generate Upop links. You need a using statement to reference  Hyland.Unity.Extensions

Then you can generate a Upop link from a document like so:

var doc = app.Core.GetDocumentByID(428);string upopUrl = doc.Upop().ShowDocumentGenerator().CreateUpopLink();

In my case, upopUrl is set to: onbase://document/view/?DocID=428&Sig=e2wScxRQiiOgC4n-9D0pJPJS50JQUHRGnpODwRuyNBU~

 

Stefan_Sulea
Star Contributor
Star Contributor

Just wanted to add to the above response that, although not recommended, the requirement for a signed link can be bypassed by adding this key in the AppServer web.config:

<add key="permitUpopLinksWithoutSignatures" value="true"/>

 

Now the link can be just something like onbase://document/view/?DocID=428, without the Sig part. This is a security risk because now you can extract documents based on their ID only if you construct the link yourself.

 

The security risk should be low: This link still opens the document in the Unity Client, and requires you to be logged into OnBase. Your rights to view or modify the document will be the same as they would be if you found it through a document query. This sort of situation is a bigger deal in some DocPop solutions, since they can include a default user ID for automatic login.

(If you do know of a way to access documents you normally couldn't, please let me know.)

I think that the bigger concern for Unity Pop links is that there is nothing in the link that specifies the OnBase database to connect to. It will try to open the document by ID in the currently-open Unity Client. If you work with both a production and non-production system, or if you support OnBase installations for multiple companies, then there is a risk that your link will open the document with the right ID in the wrong OnBase system! The Signature in the URL prevents that, because a unique identifier for the OnBase database is mixed into it. So if you take the Signature out, you also introduce that risk.

One other cool thing to note: Even if you configure OnBase to ALLOW UPop links without signatures, OnBase will still validate the signature if you do provide it. That setting just gives you the option to omit them when you can't generate them.

Thank you Nevin, that was really helpful!