Announcement

Collapse
No announcement yet.

Harnessing Acks.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Harnessing Acks.

    I'm using Mirth 1.5, will be upgrading to 1.6 soon. I have seen threads about this, but they haven't helped much. I have a channel with two destinations, one an LLP Sender and the other one a channel writer set to none. I'm trying to get the response received on 'Destination 1' LLP Sender and send it back to the previous channel. I have the following on my transformer for the channel writer:

    ********************************************
    var responseVal = responseMap.get('Destination 1').getMessage();

    responseMap.put("Response", ResponseFactory.getSuccessResponse(responseVal));
    *********************************************
    but everytime a message processes I get the following error, what am I doing wrong?:


    org.mule.umo.transformer.TransformerException: TypeError: Cannot call method "getMessage" of null (d8f6683a-b2c6-46c1-a0d8-7b21342da3ef#3) (org.mozilla.javascript.EcmaError) (org.mule.umo.transformer.TransformerException)
    at com.webreach.mirth.server.mule.transformers.JavaSc riptTransformer.transform(JavaScriptTransformer.ja va:294)
    at org.mule.transformers.AbstractEventAwareTransforme r.doTransform(AbstractEventAwareTransformer.java:4 8)
    at org.mule.transformers.AbstractTransformer.transfor m(AbstractTransformer.java:197)
    at org.mule.impl.MuleEvent.getTransformedMessage(Mule Event.java:251)
    at com.webreach.mirth.server.controllers.MessageObjec tController.getMessageObjectFromEvent(MessageObjec tController.java:460)
    at com.webreach.mirth.server.mule.providers.vm.VMMess ageDispatcher.doDispatch(VMMessageDispatcher.java: 122)
    at org.mule.providers.AbstractMessageDispatcher$Worke r.run(AbstractMessageDispatcher.java:257)
    at org.mule.impl.work.WorkerContext.run(WorkerContext .java:290)
    at edu.emory.mathcs.backport.java.util.concurrent.Thr eadPoolExecutor$Worker.runTask(ThreadPoolExecutor. java:650)
    at edu.emory.mathcs.backport.java.util.concurrent.Thr eadPoolExecutor$Worker.run(ThreadPoolExecutor.java :675)
    at java.lang.Thread.run(Unknown Source)
    Caused by: org.mule.umo.transformer.TransformerException: TypeError: Cannot call method "getMessage" of null (d8f6683a-b2c6-46c1-a0d8-7b21342da3ef#3) (org.mozilla.javascript.EcmaError)
    at com.webreach.mirth.server.mule.transformers.JavaSc riptTransformer.evaluateTransformerScript(JavaScri ptTransformer.java:401)
    at com.webreach.mirth.server.mule.transformers.JavaSc riptTransformer.transform(JavaScriptTransformer.ja va:278)
    ... 10 more
    Caused by: org.mozilla.javascript.EcmaError: TypeError: Cannot call method "getMessage" of null (d8f6683a-b2c6-46c1-a0d8-7b21342da3ef#3)
    at org.mozilla.javascript.ScriptRuntime.constructErro r(ScriptRuntime.java:3226)
    at org.mozilla.javascript.ScriptRuntime.constructErro r(ScriptRuntime.java:3216)
    at org.mozilla.javascript.ScriptRuntime.typeError(Scr iptRuntime.java:3232)
    at org.mozilla.javascript.ScriptRuntime.typeError2(Sc riptRuntime.java:3251)
    at org.mozilla.javascript.ScriptRuntime.undefCallErro r(ScriptRuntime.java:3270)
    at org.mozilla.javascript.ScriptRuntime.getPropFuncti onAndThis(ScriptRuntime.java:1966)
    at org.mozilla.javascript.gen.c10._c3(d8f6683a-b2c6-46c1-a0d8-7b21342da3ef:3)
    at org.mozilla.javascript.gen.c10.call(d8f6683a-b2c6-46c1-a0d8-7b21342da3ef)
    at org.mozilla.javascript.optimizer.OptRuntime.callNa me0(OptRuntime.java:106)
    at org.mozilla.javascript.gen.c10._c0(d8f6683a-b2c6-46c1-a0d8-7b21342da3ef:6)
    at org.mozilla.javascript.gen.c10.call(d8f6683a-b2c6-46c1-a0d8-7b21342da3ef)
    at org.mozilla.javascript.ContextFactory.doTopCall(Co ntextFactory.java:337)
    at org.mozilla.javascript.ScriptRuntime.doTopCall(Scr iptRuntime.java:2755)
    at org.mozilla.javascript.gen.c10.call(d8f6683a-b2c6-46c1-a0d8-7b21342da3ef)
    at org.mozilla.javascript.gen.c10.exec(d8f6683a-b2c6-46c1-a0d8-7b21342da3ef)
    at com.webreach.mirth.server.mule.transformers.JavaSc riptTransformer.evaluateTransformerScript(JavaScri ptTransformer.java:359)
    ... 11 more

  • #2
    Re:Harnessing Acks.

    Try

    var responseVal = responseMap.get('Destination 1');

    Comment


    • #3
      Re:Harnessing Acks.

      I tried that as well, I don't get an error but I see the value as "null"

      Comment


      • #4
        Re:Harnessing Acks.

        I've similar problem recently, just because or blank in destination's name !

        Comment

        Working...
        X