BizTalk Server Tutorial

BizTalk Server Concepts and Common Errors

Schema Versioning in BizTalk Server

Imagine, you have a Schema BizTalk Project with a valid Schema and an Orchestration BizTalk Project that is referencing your Schema BizTalk Project.

You deployed you solution and every thing goes fine.

Later you find that some changes are required for your schema to be consumed by a NEW Orchestration and you don’t want to disturb your Original Orchestration which is using your Old Version of the Schema.

How do we resolve this?

2 possible solutions.

1. Why don’t you create a new schema and consume that in your new Orchestration? Very simple right! But what if your manager says, I don’t want a new schema, reuse the same Schema!! See the second option.

2. Use two versions of the schema deploying side by side. How do we do this ?

Using two versions of the same Schema –

1. Create an application with separate project for Orchestration and Schema. Consume the Schema in Orchestration Project. Deploy and Test. Every thing should go fine.

2. Now modify your schema and change its assembly version by going to AssemblyInfo.cs and changing the assembly version.

3. Now deploy the schema project alone. Once this is done, you should be able to see two versions of the same schema in Admin Console.

4. Now its time to retest your First Orchestration which is referencing the Schema of Old Version.

Unexpectedly, you will get the below error.

(Incase if you don’t get this error, it means that you didn’t restart your host instances. Once you restart your host instance you should get this😉 )

This is happening because, BizTalk always tries to use the Latest Version of you schema. But your orchestration is expecting a message of your old Schema Type.

5. To resolve this, open your Receive Location of the Old Orchestation, Expand the XML Receive Pipeline properties and provide the Fully Schema Name ( with Old Version) including the Assembly Name for the DocumentSpecNames Property.

This will inform the Pipeline to use Old Version of the Schema for this Receive Location.

Now you should not get any errors with your Old Orchestration. You can now have another Orchestration that consumes your new version Message.

– Shiv

Note: This kind of scenario is possible only if you have your Orchestration and Schema in a seperate project. What if they are in same project ? You orchestration will even be deployed again along with your schema.

Web Counters

March 2, 2011 - Posted by | Schemas | , , , ,

2 Comments »


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: