126.9. 如何从多个语句脚本获取结果
可从 Camel 2.14 开始
作为 scripteengine evale 方法,如果它运行多个 statments 脚本,则返回 Null。Camel 现在使用来自所设置值的 "result" 键来查找脚本结果的值。如果您有多个语句脚本,您需要确保将 result 变量的值设置为脚本返回值。
bar = "baz"; # some other statements ... # camel take the result value as the script evaluation result result = body * 2 + 1