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”
- Click on “Versioning settings”
- Ensure that you select “Require content approval for submitted items”, modify your security as required and then click on “OK”
- If you navigate back to your Document Library, you will notice a new column called “Approval Status”
- 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.
- When you click on the pull down menu for the form, you now have an “Approve/reject” option – click it.
- Click on the “Approved” radio button, add a comment and click “OK”
- Notice now that the document has been approved and the Approval Status reflects this change.
- 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.
- Click on the “All Documents” drop down and select “Create View”
- Click on “Standard View” link
- Provide the View with a name: “Approved Forms”
- Create a filter that indicates only to display items in this view when “Approval Status” is equal to “Approved” and click OK.
- Add another form to this library but don’t approve it. Now toggle between the “All Documents” and “Approved Forms”
- Modify your BizTalk Receive Location so that it will only pull documents from the “Approved Forms” view.
- 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.
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:
Post a Comment