Announcement

Collapse
No announcement yet.

Get response data from Channel in destination response transformer

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

  • Get response data from Channel in destination response transformer

    Hi

    I'm developing some channels using Mirth Connect 3.4.2 and my schema could be simplified like this

    Channel A: DB ---> dispatcher logic ---> sends to Channel B
    Channel B: channel reader ---> completes some data ---> sends to Channel C
    Channel C: channel reader ---> validates data and stores in db

    Data types are
    Channel A: HL7v2x HL7v2x
    Channel B: HL7v2x XML
    Channel C: XML XML

    When Channel C stores data successfully builds a JSON object called "responseJSON" that is returned to Channel B.

    What I want to do is evaluate responseJSON object in Channel B and return an appropiate MSA message to Channel A.

    This is how dashboard looks like when selecting the connector on Channel B that connects to Channel C (requestF3 connector).



    So, the response is well-formed and I need to read it in the requestF3 transformer.

    I've tried a transformer in destination connector (from B to C) but I cannot access the response object (ERROR is "Reference not found").

    I've also tried a postprocessor script, but all I can get from destination is "SENT: message routed successfully" but not the JSON response object returned by Channel C.

    i'm pretty sure that Channel C is returning correctly the JSON object.

    Please, any help will be really appreciated. I've lost my day searching the forum but found no solution.

    Maybe the problem is the data types, but I need the HL7v2x type between Channel A and B.

    Thanks in advance
    Last edited by dtodo1paco; 02-01-2017, 03:06 AM.

  • #2
    Post a minimal reproduction set of channels here, and it'll be easier for others to help troubleshoot.
    Step 1: JAVA CACHE...DID YOU CLEAR ...wait, ding dong the witch is dead?

    Nicholas Rupley
    Work: 949-237-6069
    Always include what Mirth Connect version you're working with. Also include (if applicable) the code you're using and full stacktraces for errors (use CODE tags). Posting your entire channel is helpful as well; make sure to scrub any PHI/passwords first.


    - How do I foo?
    - You just bar.

    Comment


    • #3
      I've added a screenshot to the original post message to help understand.
      I just need to read response from requestF3 connector in its transformer/response/whatever

      Comment


      • #4
        Solved

        Ok, found. It's related to this http://www.mirthcorp.com/community/i...wse/MIRTH-3862

        My response was not a JSON object but a Javascript variable

        Originally posted by dtodo1paco View Post
        I've added a screenshot to the original post message to help understand.
        I just need to read response from requestF3 connector in its transformer/response/whatever

        Comment

        Working...
        X