我有groovy變量組件,它將獲取入站屬性並將其設置在流程變量中,如下所示。使用Groovy獲取ESB Mule消息的入站屬性
if(message.inboundProperties.'http.query.params'.Brand != null){
flowVars ['Brand'] = message.inboundProperties.'http.query.params'.Brand
}
return payload;
但我得到低於指定的錯誤。看來inboundProperties不在groovy的範圍之內。您能否告訴我如何訪問groovy中的入站屬性。
注:我不想改變有效載荷。我的目標是創建基於queryparms的flowVars。錯誤的
部分:
No such property: inboundProperties for class: org.mule.DefaultMuleMessage (groovy.lang.MissingPropertyException)
org.codehaus.groovy.runtime.ScriptBytecodeAdapter:51 (null)
The?檢查null是我的新語法。感謝分享它。 – Simbu