locked
Unconstructed message in Parallel Convoy Exception Handler RRS feed

  • Question

  • Hi

    I have an orchestration that is set up as a parallel convoy that awaits three messages. When receiving the messages I am promoting a property through a custom pipeline component. I have defined a timeout for the orchestration so in case that one of the three messages is not delivered I will get an exception. So far this is not a problem to implement. However I would like to send out an error mail when an exception occurs that contains a text with the promoted property. Unfortunately this is not possible because the compiler detects an "unconstructed message" that could happen at the start of the orchestration. I have not found a way to solve this problem yet. I have attached my orchestration below.


    • Edited by Jerome85 Tuesday, October 6, 2015 3:12 PM
    Tuesday, October 6, 2015 3:06 PM

Answers

  • IIRC, last time I implemented a similar pattern, I used a separate Scope/Timeout for each Receive Shape and set the local Message to an XmlDocument in the Catch Block.  That way, every branch has a message constructed.

    I also set a flag in each lane of the Parallel Shape to know which Messages had been received.

    Tuesday, October 6, 2015 3:14 PM
    Moderator

All replies

  • IIRC, last time I implemented a similar pattern, I used a separate Scope/Timeout for each Receive Shape and set the local Message to an XmlDocument in the Catch Block.  That way, every branch has a message constructed.

    I also set a flag in each lane of the Parallel Shape to know which Messages had been received.

    Tuesday, October 6, 2015 3:14 PM
    Moderator
  • Hi John, thanks for the answer. Is there a way that I can access the promoted property from my pipeline? Usually I access it like this "Message_1(propertyschema.Element)" but that is not possible if I create a new XmlDocument.

    Regards

    Jerome

    Tuesday, October 6, 2015 4:03 PM
  • You can still do MyMessage(MyNamespace.MyProperty) since the Context and message body are separate.

    Perhaps you just need to check if the property exists first, which is a good idea anyway:

    MyNamespace.MyProperty exists MyMessage

    You can use this in a Decide Shape or as an if() predicate.

    Tuesday, October 6, 2015 4:58 PM
    Moderator
  • I tried this but even though I'm using a decide shape it still tells me that I'm using an unconstructed message.
    Wednesday, October 7, 2015 7:50 AM