Search code examples
biztalkbiztalk-2013

Trying To Capture a message into a text or xml file before it goes through orchestration


I'm troubleshooting an issue wherein two XML elements are missing in the outgoing message.

I have the following relatively simple Orchestration:

Receive Port  -> Orchestration -> Send Port (IBM MQ)

I want to inspect the message before it goes through the orchestration, to see if the incoming message is a problem. To do this, I created an additional Send Port, with FILE type transport (I call it DefectTroubleshootingSendPort), and PassThruTransmit for Send Pipeline.

The URI for this port is : C:\temp\Defect986\%MessageID%.xml

I set the Filter for this Send Port as

BTS.ReceivePortName == "OrderManagement.MembershipActivityExport.ReceivePort"

I added this new port and the original MQ Send Port to a Send port Group and bound this group to the Outbound Logical Port of the Orchestration.

Even after this, I don't see the temp file getting written at all. The message however goes to the MQ.

Am I doing this right, or is there any better way to capture the incoming message? Do I even need a filter here?


Solution

  • You could simply stop the orchestration, but keep it enlisted. When a message comes in, an orchestration instance will spawn but sit in a Suspended (resumable) state, allowing you to view its messages.