简体   繁体   English

DataWeave - Transformer Mule 错误“没有名为‘消息’的变量”

[英]DataWeave - Transformer Mule error "There is no variable named 'message'"

How to display Outbound properties in mule via the DataWeave transformer?如何通过 DataWeave 转换器在 mule 中显示出站属性

I tried this:我试过这个:

%dw 1.0
%output application/json skipNullOn="everywhere"
---
{
   test_property: message.outboundProperties.testProperty
}

but I get this error: There is no variable named 'message' .但我收到此错误: There is no variable named 'message'

Thanks.谢谢。

invoke directly without using 'message' as shown below直接调用而不使用'message',如下所示

test_property: outboundProperties.testProperty

or else define a flow variable and use it as below或者定义一个流变量并按如下方式使用它

flowvar1: flowVars.flowvar1

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM