Note that there are some explanatory texts on larger screens.

plurals
  1. POAggregate messages from an <all> flow in Mule
    text
    copied!<p><strong>The story so far</strong></p> <p>I have a SOAP service that sends its response (say Response_A) to an &lt;all&gt; flow. Inside the flow, there are three SOAP services (say B, C and D) that take inputs from Response_A. I am taking fields from Response_A and using XSLT, I can formulate requests for B, C and D.</p> <p>Quick question: I am using &lt;async&gt; blocks inside &lt;all&gt; to process messages in parallel. The processing was not parallel when using &lt;all&gt; and &lt;processor-chain&gt; tags inside it. Any ideas why?</p> <p><strong>The roadmap</strong></p> <p>I will read the responses from all three B, C and D and combine them into a single response (probably using XSLT again) and send it to E.</p> <p><strong>The roadblock</strong></p> <p>After coming out of the &lt;all&gt; flow, I get a MuleMessageCollection. How to read it, and combine the messages into a single message?</p> <p><strong>My attempts</strong></p> <p>I tried aggregating the messages based on a correlation ID but I noticed that a correlation id is present only when the message from A was split by the &lt;all&gt; tag and was being sent to B, C and D. The correlation ID vanishes in the SOAP envelope that comes as a response from these services, even if I turned <em>enableMuleSoapHeaders</em> to true. I cannot modify the services. So, how do I make the correlation id appear on the SOAP response (provided a correlation id is absolutely necessary if I want to merge messages)</p> <p>I will also need the group size to aggregate messages, I guess.</p> <p>I even tried adding a correlation id using message property transformer, but it did not work that way. I was stuck with a MessageCollection and did not know how to read it, even though there were probably messages with correlation id's inside it.</p> <p>So, it boils down to one question. What are the ways to merge messages from a MessageCollection?</p> <p>I want to do this in xml, without writing a custom transformer in Java. Is it possible? What should be my approach?</p> <p><strong>Note</strong>: The response messages from B, C and D have different DOMs structures. The merged message that I want to create has a different DO from all of A, B, C and D's responses and requests.</p> <p>If it helps, I a trying to work on a similar situation as described here: <a href="http://ricston.com/blog/?p=640" rel="nofollow">http://ricston.com/blog/?p=640</a> only difference is, I am using flows and the all tag.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload