消息丰富和MEL

时间:2015-05-08 01:48:51

标签: mule mel

message enricher documentation使用术语"变量"例如

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

我没有找到关于该关键字的任何文档,我可以弄清楚它基本上添加了一个流量变量,但它还有什么呢? (没有关键字变量,你得到一个例外)

此外,文档中没有一个示例涉及丰富&#34;消息标题&#34; - 我的假设是邮件头意味着出站属性是正确的吗?

如果相同的流程要添加出站属性,它的外观如何(这可以根据我的测试进行)

<flow name="orderProcessingFlow">
   <inbound-endpoint ref="orderEndpoint"/>
   <enricher target="#[message.outboundProperties.var]">
       <outbound-endpoint ref="stateLookup"/>
   </enricher>
   <outbound-endpoint ref="orderStep2"/>
</flow>

1 个答案:

答案 0 :(得分:3)

#[flowVars.state]是旧的表达式语法,自3.3以来,它已被弃用并被MEL取代。我认为MEL等价物是sampleProvider = colorSensor.getRedMode(); colorSensor.setFloodlight(Color.RED);

同样,消息&#34;标题&#34;是过时的行话。您的消息属性具有不同的范围(入站,出站,流/调用和会话)。

是的,您可以在流中设置的唯一属性是出站属性(入站属性由端点设置)。

相关问题