How to debug an orchestration in Visual Studio

Hi everyBody,

All bizTalk developers knows how to debug an orchestration in the administration Console. But sometime it get you mad when there is a bug in an expression shape.

In BizTalk 2010 you can debug the orchestration’s generated  code, first compile your orchestration and deploy it.

Next attach to biztalk host instance process (if you don’t know how please see https://jeremyronk.wordpress.com/2011/06/15/the-simpliest-way-to-retrieve-the-btsntsvc-exe-pid/ )

Next go to visual studio go to your project and click on « show all files » and navigate to the destination showned in the picture below :

When you open it you get some weird code. but if you study it you can find your own code :

here is my code :

Message_1=MsgIN; Message_1.Header.ClientData.CheckInfo.Porter.AddressLine1="meuh";

And here is the generated code :

__messagetype_FnacDirect_UP_Meteor_Schemas_FrontOffice_SchemaOrder __Message_1 = new __messagetype_FnacDirect_UP_Meteor_Schemas_FrontOffice_SchemaOrder("Message_1", __ctx1__);

                    __Message_1.CopyFrom(__ctx1__.__MsgIN);
                    if (__ctx1__ != null && __ctx1__.__MsgIN != null)
                    {
                        __ctx1__.UnrefMessage(__ctx1__.__MsgIN);
                        __ctx1__.__MsgIN = null;
                    }
                    __Message_1.part.SetDistinguishedField("Header.ClientData.CheckInfo.Porter.AddressLine1""meuh");

The code is not friendly but you can put a breakpoint and see the orchestration behaviors and it work like a classic program, you can edit the values and go to another branch of your orchestration

TIPS : sometimes after an orchestration modifcation, the file0.cs doesn’t update, delete it to solve the problem

Publicités

Laisser un commentaire

Choisissez une méthode de connexion pour poster votre commentaire:

Logo WordPress.com

Vous commentez à l'aide de votre compte WordPress.com. Déconnexion / Changer )

Image Twitter

Vous commentez à l'aide de votre compte Twitter. Déconnexion / Changer )

Photo Facebook

Vous commentez à l'aide de votre compte Facebook. Déconnexion / Changer )

Photo Google+

Vous commentez à l'aide de votre compte Google+. Déconnexion / Changer )

Connexion à %s