Showing posts with label SharePoint. Show all posts
Showing posts with label SharePoint. Show all posts

Saturday, May 9, 2015

BizTalk 2013 SharePoint Adapter not respecting SharePoint 2013 View Name

 

I have done a lot of BizTalk-SharePoint Integration in the past and ran into a situation recently that surprised me. There wasn’t an easily identifiable resolution online so I have decided to document this for the benefit of others.

Background

We have a process that requires a user to approve a financial summary document in SharePoint.  Once the document has been approved, BizTalk will then fetch the details behind those financial transactions, from another source system, and send them to SAP.

In the past I have leveraged SharePoint views as a way for BizTalk to pickup messages from a SharePoint document library. The way to achieve this is to rely upon meta data that can be populated within a SharePoint document library column.

Adding a custom column to a document is very simple.  Under the library tab we will discover the Create Column label. We can simply click this button and then add a column and related properties as required. 

image

With our custom column created, we can now create a view for BizTalk to “watch”.  In our example we were dealing with an approval workflow.  We can create our custom column called Status and then when BizTalk initially publishes this financial summary document(for users to approve), we can use the SharePoint adapter to populate this column with a value of Pending.  After a user has reviewed the document, that Status value can be changed to Approved.

Since we don’t want BizTalk to move Pending documents we will create a view that will only show Approved documents.  To create a custom View we can once again click on the Library tab and then click on Create View

 

image

For our purposes a Standard View will be sufficient.

image

We need to provide a View Name and can also indicate where we want this column to be positioned.

Tip – In my experience I have experienced odd behavior with spaces in the name of SharePoint entities.  My advice is to avoid spaces in names where possible.

image

Lastly, since we only want Approved documents to show up in this field we need to add a filter.

Within our filter we want to Show items only when the following is true:

Status is equal to Approved

image

We can now save our view and test it. To test it we will upload two documents.  One will have the Status of Approved and the other will have a Status of Pending.  When we click on All Documents we should see both documents.

image

When we click on our view for BizTalk, which in this case is called BizTalkMoveView we will only see our Approved document.

image

From a SharePoint perspective we are good and we can now create our SharePoint Receive Location in BizTalk.  For the purposes of this blog post I am using a Send Port Subscription; I will receive the message from SharePoint and then send it to a File folder.

In our BizTalk Receive Location configuration we are going to use the Client OM which in this case is the SharePoint Client Object API.  This allows us to communicate with SharePoint without having to install any agents on a SharePoint Server.

We also need to configure our SharePoint Site URL, Source Document Library URL and View Name

image

When we enable our Send Port and Receive Location we should receive 1 file in our File Folder right? WRONG! Both files were picked up and moved to our file folder even though we have a View enabled.

image

If we go back to SharePoint we will discover both documents are gone.

image

Issue

The issue is that for some reason, BizTalk 2013 is not using/respecting the View Name property that is available in the Receive Location Configuration.

Resolution

The resolution is to install BizTalk 2013 CU 2. The download and more details about CU2 can be found here.

Before you install, the recommended approach from Microsoft is:

  • Stop all host instances
  • Stop SQL Server Agent which is responsible for running the internal BizTalk jobs
  • Perform a Database Backup

Running the CU2 exe is pretty straight forward and only takes a couple minutes.  I wasn't prompted for a reboot but decided to go that route regardless.

After applying the CU, I uploaded two documents again.  One had a Status  of Approved while the other had a Status  of Pending.

image

Our BizTalkMoveView is also displaying our file correctly

image

When we enable our Receive Location we will discover that only our Approved file has moved.

image

image

Our document that was in a Pending state remains in SharePoint as expected.

image

Conclusion

BizTalk 2013 was the first version that had support for the SharePoint Client Object model.  So I am not sure if this bug only impacts when you are using the Client OM within the BizTalk Receive Location.  I do know that in previous versions of BizTalk that this was not an issue.  However those versions of BizTalk relied upon the SharePoint Adapter Service being installed on the remote SharePoint Server.  Using the Client OM is the way to go as it also allows you to communicate with SharePoint Online/Office365.

Monday, July 18, 2011

BizTalk 2010: Line of Business Systems Integration Book has been released

For the past 10 months I have been involved in a project with 4 other talented individuals.  This project was a little different than the projects that I have been involved with in the past.  While other projects have always had some sort of documentation deliverable, documentation, in the form of a book was the main deliverable this time around.

While many BizTalk books exists, we felt there was an opportunity when it came to discussing Line of Business integration with BizTalk Server 2010.  With the amount of talent involved in this book, I am very confident we have filled some of the void that exists on this topic.

I would like the thank the following authors for their tremendous efforts:

I also want to thank our Technical Reviewers who spent a lot of hours reviewing our content and definitely increased the quality of the book:

You may now find the book available on the Packt Publishing site and on Amazon.com.

Saturday, October 3, 2009

BizTalk 2009 + SharePoint/WSS 3.0 integration first look

The organization that I work for is leveraging SharePoint heavily due to its nature of it being a collaboration platform. Much like we leverage BizTalk to minimize the amount of custom work to integrate, we leverage SharePoint to reduce the amount custom work to collaborate.

We currently run MOSS 2007 and were running BizTalk 2006 so we haven't had many opportunities to attempt this integration since BizTalk 2006 only supports Windows SharePoint Services 2.0. The way I understand it, MOSS 2007 is built upon WSS 3.0 so BizTalk 2009 is capable of communicating with either WSS 3.0 or MOSS 2007. A difference between the two is that WSS 3.0 is free where as MOSS 2007 requires licenses. I am not going to further differentiate the two but will leave you with this link instead.

If you are already familiar with BizTalk and SharePoint integration then you may want to move on (you probably won't learn much from this post). The idea behind this post is to help out the new comers to this integration scenario. I recall having several questions when starting out so I figured putting together some answers to these questions may save some people some digging.

The very first thing that you need to do before cracking open any tools or downloading any install packages is watch Mick Badran's Web cast on SharePoint integration. For those of you who don't know Mick he is a BizTalk MVP and if Microsoft allowed it he could probably be a SharePoint MVP as well. This web cast help me out tremendously!

Reducing the confusion
  1. While the Windows SharePoint Services Adapter shows up in your list of adapters in BizTalk Admin, it doesn't mean that it is ready to be used. The BizTalk - SharePoint Services Adapter is not able to work all on its own. In order for you to use this adapter, you need to install the BizTalk - SharePoint Services Adapter Web Service. Confused yet? This adapter web service knows how to intelligently call the SharePoint API. While you could call these SharePoint Web Services directly, the BizTalk Adapter abstracts this complexity away from you. You will not require any Web Service Proxies in your solutions which is a big plus.
    Once installed, a virtual directory will appear in your SharePoint Site.

  2. Update - You only need WSS installed on your BizTalk servers if you plan to host WSS sites on your BizTalk servers. If you plan to connect to remote WSS or MOSS servers you do NOT need WSS installed on your BizTalk Servers.
  3. Follow the BizTalk install guide! This should be a given but don't try to 'assume' your way through the install and configuration of WSS. There are some decisions like ensuring that your WSS install is part of a Server Farm even if you are running it on one BizTalk Server. Here is the link.

  4. There are some 32 bit/64bit considerations - read the fine print carefully.

  5. In distributed environments, create your AD groups/accounts ahead of time.

  6. Leverage any SharePoint resources you have available to you. I have used SharePoint, as a user, for quite some time but there is still some terminology that I am not too familiar with (Lists, Document Libraries, Workspaces, BDC etc). I had a SharePoint colleague give me a 10 minute walk through of creating Document Libraries, Custom Views etc and it went a long way.

All in all I am pretty pleased with the experience. Within a couple hours I had WSS 3.0 installed, the Adapter Web service installed and configured and am pushing/pulling documents into/from WSS 3.0 via Send Port Subscriptions.

Expect a few more posts on this subject as I plan on taking this topic a few steps further by integrating with InfoPath and LOB systems.