How to handle messages that might correlate (or might not)

Published Sat, Apr 10 2004 11:00 PM

In my current project we are in a situation where we receive messages that might correlate with existing orchestration, but just might not correlate as well. The messages that don't correlate are perfectly valid, but just don't belong to an already running orchestration instance. I discovered a way tonight that handles this situation very elegantly. The sample showing exactly how can be found here. Unzip it to the root of c:. Build and deploy the project and then use the drop directory to run the process. First throw in the FirstMessages in their in folder and then the SecondMessages in their in folder.

The key to the solution is the use of seperate orchestration to handle the incoming messages that might correlate. This orchestration uses a direct port which is somehow described in my other post of today.

In short the solution is as follows:

  • Build an orchestration with the correlating flow. Let the correlating messages listen to a direct port.
  • Build an additional orchestration that listens to the messages that might correlated.
  • Send the message to main orchestration inside a scope shape
  • Connect an exception catch block to the scope shape, and start the alternative orchestration for noncorrelating message (or do the stuff there and then).

Refer to this article at Jan Tielen's blog for a guide on using exception blocks (I needed it ;-).

 

Filed under:

Comments

# Carlo Poli said on Wednesday, April 14, 2004 8:20 AM

Everybody needs exception blocks when doing things outside the current orchestration. If you don't and an error occurs you get a no-traceble orechstration in the HAT.

# TrackBack said on Wednesday, April 14, 2004 1:53 PM

# Carlo Poli said on Thursday, April 15, 2004 6:08 PM

Hi

I would like know more about this corelation . When should I use it etc.,?

Thanks

# Carlo Poli said on Tuesday, April 20, 2004 10:59 PM

@Sam - Use it whenever you get messages of a specific type that could correlate with a running orchestration but not necessarely will and if it doesn't correlate another action needs to be started.

# TrackBack said on Tuesday, April 20, 2004 11:08 PM

# Carlo Poli said on Saturday, November 06, 2004 1:22 AM

Dealing with messages that might correlate (or might not) when you have one "Concurrent" and one "Sequential" convoy in the same orchestration...