I need to have a correlation set when an email comes in and when a file comes from an ftp site. The file name is not in the email. There is actually not anything that I can use to correlate between the two.
I figured that I simply would create a pipeline component and correlate off that context property. So I whip up a pipeline component that is REALLY easy, I have a property in the propertybag that can be set in design/promote time.
I use the following code:
inmsg.Context.Write("PropertyValue", "http://PromotionPropertyValue.Property", Value);
I create the correlation set and deploy away. However when I pull the file from the FTP site, the orchestration does not start up!
I look at the subscriptions and this is what I see:
Well, of course I have that promoted, I just did it in the code, so I look at the message that is suspended (cause it had no where to go).
WHAT! The value is there, but it is not Promoted.
I then went in and looked thru the methods available here and I saw Promote instead of Write. I changed the code to look like this:
inmsg.Context.Promote("PropertyValue", "http://PromotionPropertyValue.Property", Value);
I ran the message thru again and this is what I saw afterwards:
Now my orchestration was kicked off and I am a happy camper. (Okay, not quite, the rest of the logic has to be tested now.)