Mirth Community

Mirth Community (http://www.mirthcorp.com/community/forums/index.php)
-   Support (http://www.mirthcorp.com/community/forums/forumdisplay.php?f=6)
-   -   Get response data from Channel in destination response transformer (http://www.mirthcorp.com/community/forums/showthread.php?t=216895)

dtodo1paco 01-31-2017 10:17 AM

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).

https://s24.postimg.org/kbzi6n9j9/Sc...1_13_02_29.png

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

narupley 01-31-2017 11:32 AM

Post a minimal reproduction set of channels here, and it'll be easier for others to help troubleshoot.

dtodo1paco 02-01-2017 04:09 AM

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

dtodo1paco 02-01-2017 04:22 AM

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

Quote:

Originally Posted by dtodo1paco (Post 258410)
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



All times are GMT -8. The time now is 01:30 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Mirth Corporation