我正在使用mirth connect 3.3并在从mirth连接变换器将值设置为JMS头时发出问题。我设定的价值如下:
var map = Packages.org.mule.impl.RequestContext.getEventContext().getProperties();
map.put('key','value');
但是得到了这个错误:
TypeError: Cannot call property getProperties in object [JavaPackage org.mule.impl.RequestContext]. It is not a function, it is "object".
at 22f9d2db-a1f5-4e4e-99f9-78e93d3b6135:57 (doTransform)
at 22f9d2db-a1f5-4e4e-99f9-78e93d3b6135:85 (doScript)
at 22f9d2db-a1f5-4e4e-99f9-78e93d3b6135:87
at com.mirth.connect.server.transformers.JavaScriptFi lterTransformer$FilterTransformerTask.call(JavaScr iptFilterTransformer.java:154)
at com.mirth.connect.server.transformers.JavaScriptFi lterTransformer$FilterTransformerTask.call(JavaScr iptFilterTransformer.java:119)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker( Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (Unknown Source)
at java.lang.Thread.run(Unknown Source)
有没有其他方法可以将值设置为JMS标头,以便我可以使用该消息在声音上获取它?