我正在尝试在Mule中定义全局函数。我有一个包含多个功能的文件。然而,骡子正在抛出异常。我的全局函数定义如下:
<configuration doc:name="Configuration">
<expression-language>
<global-functions file="myscripts.groovy">
</global-functions>
</expression-language>
</configuration>
导致错误的函数定义是合法的groovy函数,如下所示:
def convert(names,lookup){
totals=[]
names.each{
name->
result=[:]
result['id']=1
result['value1']=lookup['code1']
result['value2']=lookup['code2']
result['value3']=lookup['code3']
totals.push(result)
}
totals
}
Mule投掷的错误是 ++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++++ org.mule.module.launcher.DeploymentInitException:CompileException:[错误:未知类或非法语句:org.mule.mvel2.ParserContext@47b11ec7] [近:{...总数....}] ^ [行:12,专栏:31] 在org.mule.module.launcher.application.DefaultMuleApplication.init(DefaultMuleApplication.java:212)〜[mule-module-launcher-3.8.3.jar:3.8.3]
导致Mule抛出错误的定义有什么问题&#34;
请帮忙!