web stats
Using Transformed data at source connector in the destination connector - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 10-06-2016, 06:42 AM
DragonQueen DragonQueen is offline
OBX.1 Kenobi
 
Join Date: Aug 2016
Posts: 37
DragonQueen is on a distinguished road
Default Using Transformed data at source connector in the destination connector

I am trying to parse a delimited text file to JSON and call an endpoint.

I transformed the delimited text to JSON successfully at the source connector but not sure how to pass the transformed data from the source connector to the destination connector to call the API.
I set the data type as follows:
Source Connector Delimited Text(Inbound) JSON(Outbound)
Destination Connector JSON(Inbound) JSON(Outbound)

-------------------------------------------------------------------------------

I also tried just transforming the data at the destination connector and call the API. The problem is the transformed data is now in xml and throws an error.

I set the data types as follows:
Source Connector Delimited Text(Inbound) Delimited Text(Outbound)
Destination Connector Delimited Text (Inbound) JSON(Outbound)

Not sure how to resolve this.
Reply With Quote
  #2  
Old 10-06-2016, 07:13 AM
siddharth siddharth is offline
Mirth Guru
 
Join Date: Feb 2013
Posts: 832
siddharth is on a distinguished road
Default

Create a variable mapper in source with scope of channelMap and map it to the JSON you just developed in transformer.
Or,
add this line at the end of your source transformer

$c("jsonMessage",yourJSONVariableHere)

Then this variable will be available for you in the destination, just drag-drop it in the template variable to send to the API.
Reply With Quote
Reply

Tags
api, delimited text, json, transformed data

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 07:08 PM.


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