Sunday, October 18, 2009

ShareTalk Integration (SharePoint/BizTalk) – Part 7 Adding Content Approval

In the last post, I showed you how to submit InfoPath forms to SharePoint and have BizTalk consume those forms once they were posted.  This is great, but what if you need to have a supervisor approve the form before BizTalk consumes it?  In this post we will use a feature in WSS 3.0 called “Content Approval” to mange the state that a document is in.

 

  • Open up your Document library, click on “Settings” – >”Form Library Settings”

image

  • Click on “Versioning settings”

image

 

  • Ensure that you select “Require content approval for submitted items”, modify your security  as required and then click on “OK”

image

  • If you navigate back to your Document Library, you will notice a new column called “Approval Status”

image

  • Notice that when you add a new form that it has a status of “Pending”.  Also, if you haven’t done so disable your BizTalk receive location because BizTalk will not observe the status of the document – for now anyways.

image

  • When you click on the pull down menu for the form, you now have an “Approve/reject” option – click it.

image

  • Click on the “Approved” radio button, add a comment and click “OK”

image

  • Notice now that the document has been approved and the Approval Status reflects this change.

image

  • So if we want BizTalk to only consume forms that have been approved, how does this help us?  What we can now do is create a “View” and then populate the “View Name” property in the BizTalk Receive Location.

image

  • Click on the “All Documents” drop down and select “Create View”

image

  • Click on “Standard View” link

image

  • Provide the View with a name: “Approved Forms”

image

  • Create a filter that indicates only to display items in this view when “Approval Status” is equal to “Approved” and click OK.

image

  • Add another form to this library but don’t approve it.  Now toggle between the “All Documents” and “Approved Forms”

image

image

  • Modify your BizTalk Receive Location so that it will only pull documents from the “Approved Forms” view.

image

  • Enable this receive location and you should find that only the “Approved” form is consumed.  The “Pending” form should still be in the document library.

image

image

 

What really impresses me about building these scenarios is the depth of the Microsoft platforms.  I haven’t been in Visual Studio much at all through this series.  There is so much functionality that is available out of the box which makes these scenarios very quick to build.

No comments: