Richard Hallgren wrote a good post about Using BAM for latency tracking in a BizTalk request response scenario. (It contains one error though – you should use InstanceId, not ServiceID as continuation. See another post for more details.)
But what if you also want to track things in an orchestration and correlate that with port tracking? What you have to do is to create two continuations. One takes care of the request/respons correlation as Richard describes, and the other correlates that with the orchestration. This continuation uses InterchangeID. Step-by-step:
1. Add a second continuation and call it e.g. OrchestrationToPort.
2. Click Select Event Source, Select Orchestration Schedule, find your orchestration, right click on the send shape and select Message Property Schema. Select InterchangeID and drag it to the OrchestrationToPort continuation. Possibly, do this for more orchestrations you’re interested in tracking.
3. Create a continuation ID and call it the same name as the continuation.
4. Click Select Event Source, Select Messaging Property, select InterchangeID and drag it to your OrchestrationToPort continuation ID. Right click your newly added InterchangeID on the left side of the TPE and select Select Port Mappings. Select the send port (or ports).