Changing SoftPro Document Storage

Discussions concerning general integration topics.

Moderator: Phil Barton

Post Reply
muhsmann
Posts: 54
Joined: Thu Jan 15, 2009 5:41 pm

Changing SoftPro Document Storage

Post by muhsmann »

I was recently on a phone call w/ some of the developers at SoftPro and I was informed that I could control the document storage in SoftPro. The suggestion was made to replace SoftPro.Documents.Storage.dll by implementing my own version of IDocumentStorage. Its my understanding that there currently is not any documentation on this topic and was directed to this forum.
I have searched of info on doing just that but I only found once instance on a topic that was unrelated. My company wants to use a different application for the document repository for SoftPro and maybe there are other ways of handling this - but the suggestion above sounds interesting. Any help w/ documentation, examples, etc would fantastic.
Mark McKenna

Re: Changing SoftPro Document Storage

Post by Mark McKenna »

Providing your own document storage solution completely replaces the default one that we provide out of the box, which essentially just stores files on a file share and then persists a Uri link to those files with the Order in the database. You do so by creating your own class that implements SoftPro.Documents.Storage.IDocumentStorage. This contract requires that you provide 3 methods:
  • SaveDocument - This method takes an IDocumentStorageItem object reference which contains metadata about the attachment, including an extensible "Properties" string->object map that (currently) hands you the order ID and the order number (something that could be extended in the future to meet the needs of our customers). The method returns a Uri that you would construct to uniquely identify the document in your DMS - this link will then be stored in the SoftPro database alongside the Order.
  • LoadDocument - This method takes a Uri as a param that is the Uri you gave us back from SaveDocument. This is where you reverse the process and access the proper document in your DMS using the Uri and then feed us back a Stream object with which we can reconstruct the document. This would be used on the Document Attachments screen to "view" an attachment ... we would grab the Uri, hand it to you, get a Stream back from you, and reconstruct it locally for the user to view within Select.
  • RemoveDocument - This method takes a Uri as a param that is the Uri you gave us back from SaveDocument. You would use the Uri to find the document in your DMS, and remove it from there.
These calls are all triggered when an Order is saved in Select.
Mark McKenna

Re: Changing SoftPro Document Storage

Post by Mark McKenna »

One thing I forgot to mention. The document storage class is identified as an attribute of the Select Server's Integration service using a fully qualified type that includes the assembly name within which the type exists. If you look at the IntegrationRegistration.xml file you'll see the "StorageSystem" attribute that specifies our default. You can change that to whatever you like and re-register the Integration service, and your change will take effect immediately. The assembly you create should be in the same directory as our SoftPro installation.
muhsmann
Posts: 54
Joined: Thu Jan 15, 2009 5:41 pm

Re: Changing SoftPro Document Storage

Post by muhsmann »

Mark,
Please excuse my ignorance but how do I go about 're-register the Integration service'.
I modified the file IntegrationRegistration.xml located in my Select Server\Tools folder. I restarted IIS but when I run 'sps.exe services' the StorageSystem attribute StorageSystem still contains SoftPro.Documents.Storage.FileSystem.FileSystemStorage, SoftPro.Documents.Storage.FileSystem.
muhsmann
Posts: 54
Joined: Thu Jan 15, 2009 5:41 pm

Re: Changing SoftPro Document Storage

Post by muhsmann »

Mark,
I think I have it figured out. using the register switch on sps.exe seems to have done the trick.
roteague
Posts: 292
Joined: Thu Sep 25, 2008 4:49 pm
Location: Honolulu, Hawaii

Re: Changing SoftPro Document Storage

Post by roteague »

Interesting. Where is the default storage location?
Robert
muhsmann
Posts: 54
Joined: Thu Jan 15, 2009 5:41 pm

Re: Changing SoftPro Document Storage

Post by muhsmann »

In the IntegrationRegistration.xml when I replace the StorageSystem attirbute value what is the format of the string? The original value is:
value="SoftPro.Documents.Storage.FileSystem.FileSystemStorage, SoftPro.Documents.Storage.FileSystem"
I'm assuming the SoftPro.Documents.Storage.FileSystem.FileSystemStorage refers to class and SoftPro.Documents.Storage.FileSystem refers to the assembly.
So I'm replacing the first part w/ my implementation of IDocumentStorage fully quailified name and the second part w/ the dll I have built. Please let me know if I'm in error.
Mark McKenna

Re: Changing SoftPro Document Storage

Post by Mark McKenna »

roteague:
By default, we store the file on a file share as prescribed in the user's profile under Managers and Report Preferences (Images Directory).

muhsmann:
That is correct. A fully qualified type name includes an assembly name, namespace, and type name. We follow the same specification used by many of the .NET reflection operations.
HariK
Posts: 25
Joined: Wed Feb 23, 2011 4:15 pm

Re: Changing SoftPro Document Storage

Post by HariK »

What is the process to change softpro document storage to use a custom DMS, in softpro 4.1
I don't see IDocumentStorage interface in softpro 4.1

Can you point me to any documentation which does this

Thanks
Hari
Post Reply