Sunday, January 10, 2010

ShareTalk Integration (SharePoint/BizTalk) – Part 9 Overwrite - Rename Mode

While further investigating SharePoint-BizTalk integration capabilities I ran into a file overwrite mode called “Rename” which I thought was rather unique.  I have never seen something like this in the FILE or FTP adapters so I figured that I would post something on it.

The WSS Adapter has an Overwrite property  that allows you select one of the following modes:

image

The Yes and No values are pretty self explanatory.  Orchestration allows you to determine which mode you want to set  within an Orchestration at run time.

When you select the Rename value, BizTalk will use the static file name that you have configured in the Send Port configuration or the actual file name of the source document.  If the document library does not contain a file with this name already, it will be added with the correct filename.

 

image

Where it gets interesting is when you try to insert a file with the same file name as one that already exists in the same document library.  When this situation occurs the first portion of the file name will remain intact, however a unique identifier will be added to the end of the filename.  BizTalk will not raise a warning or error indicating that this event has occurred.

image

So when would I use this?  I think this feature could be used in one of those “exception to the rule cases” where the business has indicated that “there will never be a duplicate file uploaded into this document library” but it actually happens.  It is also helpful when the view of the document library has been configured in such a way that the documents are sorted by file name.  This way it makes it easier to identify one of these cases as opposed to just using a Message ID where the document could end up being displayed in a very random fashion.

No comments: