Here's my MessageContract
[MessageContract(IsWrapped=false)]
public class SubmitterRequestMessage
{
[MessageBodyMember]
public Expense Expense { get; set; }
}
And I went to set the CorrelatesOn property of my ReceiveActivity. It nicely gave me something like the following:
sm:body()/xg0:SubmitterRequestMessage/xg0:Expense/xg1:WorkflowID
However, when I execute my workflow, it throws an exception. As usual I have to enable WCF tracing to get pass all the useless generic WCF error messages to find out what's the problem. The error message I got was:
A correlation query yielded an empty result set. Please ensure correlation queries for the endpoint are correctly configured.
Then I found this article Troubleshooting Correlation
Turns out there is a bug in the tool which generates the wrong XPath. To fix the problem, I simply need to change it to:
sm:body()/tempuri:Expense/xg1:WorkflowID
and everything works. I don't understand why such things can happen in the best IDE on the planet. I don't understand how such thing can slip through VS's QC and I certainly don't understand why it isn't fixed in SP1.
No comments:
Post a Comment