0

The message enricher documentation uses a term "variable" for example

<flow name="orderProcessingFlow">
   <inbound-endpoint ref="orderEndpoint"/>
   <enricher target="#[variable:state]">
       <outbound-endpoint ref="stateLookup"/>
   </enricher>
   <outbound-endpoint ref="orderStep2"/>
</flow>

I did not find any documentation on that keyword, I can figure out it basically adds a flow variable, but is there anything more to it ? (without keyword variable you get a exception)

Also none of the examples in the documentation refer to enriching "message headers" -- My assumption is that message headers implies outbound properties is that correct ?

If the same flow were to add a outbound property how would it look (this works based on my tests)

<flow name="orderProcessingFlow">
   <inbound-endpoint ref="orderEndpoint"/>
   <enricher target="#[message.outboundProperties.var]">
       <outbound-endpoint ref="stateLookup"/>
   </enricher>
   <outbound-endpoint ref="orderStep2"/>
</flow>
Sudarshan
  • 8,574
  • 11
  • 52
  • 74

1 Answers1

3

#[variable:state] is the old expression syntax, it's deprecated and replaced by MEL since 3.3. I think the MEL equivalent is #[flowVars.state]

Similarly, message "headers" is obsolete lingo. You have message properties with different scopes (inbound, outbound, flow/invocation and session).

And yes the only properties you can set in a flow are outbound properties (inbound ones are set by endpoints).

David Dossot
  • 33,403
  • 4
  • 38
  • 72