I have a flow which transforms one payload and sends it via a vm to another flow. I want to be able to retrieve the list from the previous transformer. Unfortunately, only the original message that was put on it gets sent to the inbound vm of the other flow. Whether I set the payload or set property neither gives me a list. How can I get the list to the second transformer using the vm?
<flow name="Flow1">
<custom-transformer class="com.nek.transformer.MyXmlToListTransformer">
<set-property propertyName="listProp" value="#[payload]"/>
<set-payload value=#[payload]/>
<vm:outbound path="listHandler">
</flow>
<flow name="Flow1">
<vm:inbound path="listHandler">
<custom-transformer class="com.nek.transformer.MyListToMapTransformer">
</flow>
//This transformer wants the list from the previous transformer
public MyListToMapTransformer extends AbstractTransformer{
public Object doTransform(MuleMessage message, String outputEncoding){
//Neither gives me the list from the previous transformer
Object obj=message.getInboundProperty("listProp");
obj-message.getPayload();
}
}
Use set-property and reference the value by using message.getInboundProperty('myprop')