Blog Stats
  • Posts - 17
  • Articles - 1
  • Comments - 3
  • Trackbacks - 28

 

Microsoft BizTalk 2004 Business Rules Engine Utility to Create Updated Policy Versions From Updated Voacbularies.

Hi all and a happy new year, Sorry I haven't posted in a while but I've had a great Summer Holiday, wedding and honeymoon in Bali :)

I'm re-energised and ready for a great 05, I might even sit the new BizTalk 2004 Partner Exam.

Having worked a while with the Rules Engine now, and having used Vocabularies to describe my XSD schemas. I have discovered that there is no easy way to update a deployed policy to use an updated vocabulary. What do I mean by this? Take the following scenario:

I have a Vocabulary “Client.Project.Configuration.VocabularyVersion 1.0 published and being used by a couple of deployed Policies.

 

Both Policies “Client.Project.Configuration.Policy” and “AnotherClient.Project.Configuration.Policy” use the “Client.Project.Configuration.Vocabulary ”.

Imagine the pain involved if you discover that a Vocabulary that has lots of definitions and that it is used in numerous deployed Polices needs to be updated. I have found that Vocaularies often need to be updated if you discover a spelling mistakes in a definition or if a new field is added to the underlying XSD and needs a definition created for it in an existing Vocabulary. A new Vocabulary Version can be created easily by copying and pasting a new policy version from an existing Vocabulary Version; all deployed policies using the original vocabulary must be updated manually to point to the new vocabulary version and have the appropriate values set!  This process is very time consuming and I have run into on many occasions so much so that I have written a utility to solve it.

The utility can be downloaded from here; use at your own risk, there is absolutely no warrenty or liability for data loss. Ensure you back up your policies to file before using this tool in a production environment.

How to use the utility:


1. Right Click on the published version of the Vocabulary and click copy .
2. Right Click on the top level Vocabulary and select “Paste Vocabulary Version


 


3. Click on the definition you wish to change and select modify.

In our case the definition should have read “Number of hours to wait before process times out.” As opposed to “Number of days” so I make this change and publish the new version of the Vocabulary.

This is where the utility I have written comes into play. We’ll use the utility to create and deploy new versions of the deployed policies that use the updated vocabulary and have the same values set as the previous policy version. E.g. “Client.Project.Configuration.Policy” version 1.0, “First_Configuration” uses the “Client.Project.Configuration.Vocabulary” version 1.0 to set the “Number of days to wait before process times out.” To the value of 4. After running the utility we will have a new version of this policy deployed “Version 1.1” that uses “Client.Project.Configuration.Vocabulary” version 1.1 to set the “Number of hours to wait before process times out.” To the value of 4.


 

Launch the utility.


The familiar server/ config database selection screen is display, confirm the settings are correct and click Next


Select the vocabulary set where you have two or more versions published.


Select the original Vocabulary version and the updated Vocabulary version. Click Next.


The utility identifies all the Deployed Policies that are currently using the original selected vocabulary. In this case the “Client.Project.Configuration.Vocabulary” version 1.0. We need to identify which of those policies we wish to create an updated version of that uses vocabulary version 1.1. I select both policies and click Next.

 

A summary of the process is displayed if this is correct click Next.

 

The work is done and a summary screen is displayed in this case the new policies have a version number of 1.2 because I had already created a version 1.1 manually. The version number is automatically assigned to be the next greatest version number available.

If I flick back to the Microsoft Business Rules Composer screen I’ll see the new policy versions that I have created:
 

If you wanted to now you could Undeploy and Delete the Version 1.0 Policies and then Delete the Version 1.0 Vocabulary.

 


Feedback

# re: Microsoft BizTalk 2004 Business Rules Engine Utility to Create Updated Policy Versions From Updated Voacbularies.

Gravatar hey would you know how to create the policies programmatically, i saw some microsoft samples, but sitll confused - newbee 3/14/2005 6:04 PM | newbee

# re: Microsoft BizTalk 2004 Business Rules Engine Utility to Create Updated Policy Versions From Updated Voacbularies.

Gravatar Creating policies programmatically requires an understanding of the Business Rules API.

Have you tried the MS samples that ship with BTS "C:\Program Files\Microsoft BizTalk Server 2004\SDK\Samples\Business Rules" specifically "Business Rules Hello World1" and "Business Rules Hello World2".

To download the updated BizTalk Server 2004 SDK, go to http://go.microsoft.com/fwlink/?LinkId=24723 3/15/2005 8:20 AM | Nigel Parker

# re: Microsoft BizTalk 2004 Business Rules Engine Utility to Create Updated Policy Versions From Updated Voacbularies.

Gravatar Excellent tool, but this utility doesn't seem to work on policies with more than one vocabulary attached to them. Any ideas? 6/29/2005 10:45 AM | hopeful

# re: Microsoft BizTalk 2004 Business Rules Engine Utility to Create Updated Policy Versions From Updated Voacbularies.

Gravatar On running the tool, the SelectPolicies page does not load any of the policies. I tried running it on different policies. But the policies was not loaded anytime.
The wizard appears blank. 5/8/2006 9:19 PM | Ratnakar

Post a comment





 

Please add 5 and 5 and type the answer here:

 

 

Copyright © Nigel Parker