Query HAT based on an interchange Id
Initially I was struck by the fact that there's no apparent way to find anything in HAT based on the interchange id.
I've got to look at it because we're doing quite a lot of tracking in our solution and as you can imagine, the interchange id was quite an appealing thing to use to id our processes and link various tracking and tracing information to them.
However, we quickly found out that when we do have a problem, although we can quickly get from our tracking the interchange id, there's no query in HAT that would find you the orchestration instance(s) that relates to that interchange id. the interchange id seems to be in the message's context and thats it. or so we thought.
Since we track a lot of information, over time, we could take an overview of what we have again, and so we spotted that the interchange id is always the id of the first message in the interchange (at least in our case, we did not do an extensive research into this)
This mean that we could now easily write a HAT query that would find this messgage. then - looking at that message's flow we can see which pipeliens and, more importantly for us, which orchestrations processed it and even get a neat little link to open them in replay mode.
The more difficult bit is to locate instances of orchestrations that are part of that interchange but we're spawned as a result of other direct bound ports from the orchestration ( as opposed to call or start orchestration shapes), but with careful digging through HAT I do belive that is possible as well.
So - to conclude - it is possible, and actually quite easy, to find an orchestration in HAT using an interchange id.