BizTalk Orchestration Debugging

We can Debug the BizTalk Orchestrations using Orchestration Debugger or EventLogs.

Orchestration Debugger

  1. Create BizTalk application using Orchestration, Build and Deploy.
  2. Test the BizTalk application using File Drops/ SoapUI/PostMan
  3. Go to BizTalk Admin console and Click on BizTalk Group then Click on Tracked Service Instances
  4. Right click on Orchestration instance and click on Orchestration Debugger.

4.png

5. You can see two panels, left side panel is for Tracked Events and right side panel is for Orchestration.

5.png

 

6. In right side panel, right click on Receive shape and select “Set Breakpoint on Class F9”.

6.png

7. You can see break point is inserted on Receive shape, same way you can keep break points on required orchestration shapes.

7.png

8. Close the Orchestration instance.

9. Now repeat the step 2 above (Test the application)

10. Go to BizTalk Admin console and Click on BizTalk Group and then Click on Tracked Service Instances

11. You can see Orchestration instance with state “Started

11.png

12. Right click on Orchestration instance and click on Orchestration Debugger.

13. Now we need to attach the Orchestration instance to break points, for that we need to hold on Ctrl key and press the letter A (Ctrl+A)

13.png

14. You can see Receive shape of the orchestration with Yellow color highlighted.

15. In order to move the control from one shape to another shape, you need to hold Ctrl button and press the letter ‘G’ (Ctrl+G)

15.png

16. Now you can see Receive shape properties in left panel bottom side, if you click on particular message or variable, you can see the result of that shape in right side below.

In the below screenshot, InputMsg is the message type assigned to Receive shape of the orchestration and result you can see in right side windows PartType and PartValue.

16.png

17. Same way you can see the result of all the orchestration shapes which are having break points.

17.png

Note: Once you are done with orchestration debugging, please remove all break points from Orchestration debugger.

EventLogs:

Using below statement in BizTalk expression shape, we can write the messages or variable values to event viewer.

System.Diagnostics.EventLog.WriteEntry(“EventName”,”Value”);

Using below code in BizTalk expression shape, we can write the orchestration input message to event viewer.

varXmlDoc = InputMsg;

System.Diagnostics.EventLog.WriteEntry(“InputMsgData”,varXmlDoc.OuterXml);

//InputMsg is the message type of the Orchestration Receive shape

//varXmlDoc is the variable of the type System.xml.xmldocument.

Event1.png

 

 

How to open Event Viewer?

Click on Windows StartàClick on Run

Event2.png

 

Event3.png

Double click on InputMsgData to view the message data.

Event4.png

Advertisements

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 )

Google+ photo

You are commenting using your Google+ 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 )

Connecting to %s