0
votes

I am attempting to set an outbound property prior to using scatter-gather, which subsequently sends a copy of each message to a for loop which breaks the collection and sends the objects over a vm queue. I want to use the outbound property in my subsequent flow, as an inound property, of course, but my properties don't even make it past the scatter-gather. Here's roughly what my flows look like:

<flow name="ProcessPage">
    <vm:inbound-endpoint path="processPage" exchange-pattern="one-way" doc:name="processPage" />
    <message-properties-transformer doc:name="set parentId (e.g. Facebook Page or Group Id)">
        <add-message-property key="parentId" value="#[payload.get('fbAggregatorSource').get('id')]"/>
    </message-properties-transformer>
     <component doc:name="GetPagePostsAndEvents">
        <spring-object bean="pageService"/>
     </component>
    <scatter-gather doc:name="Scatter-Gather">
    <foreach collection="#[payload.get('posts')]" doc:name="For Each">
        <vm:outbound-endpoint exchange-pattern="one-way" path="processPost" doc:name="processPost"/>
    </foreach>
    <foreach collection="#[payload.get('events')]" doc:name="For Each">
        <vm:outbound-endpoint exchange-pattern="one-way" path="processEvent" doc:name="processEvent"/>
    </foreach>
    </scatter-gather>
</flow>
<flow name="TransformPostToActivity">
    <vm:inbound-endpoint path="processPost" exchange-pattern="one-way" doc:name="transformPostToActivity" />

... Does more stuff ....    
</flow>
2

2 Answers

1
votes

Outbound properties won't pass thorough and outbound-endpoint. At that point the outbound properties are used to perform the request, and whatever are the response headers will become the inbound properties after the endpoint.

If you intend to keep the properties all along the flow use flow variables instead.

0
votes

By default Outbound properties will become Transport specific request headers.

Scatter Gather will broadcast your message, so you should be able to see the outbound properties at Vm outbound endpoint