In the javascript transformer i could access the Source Directory given in the Source Tab of mirth by
var xmlDirectoryName = sourceMap.get("fileDirectory");
likewise how do i access the destination file directory from javascript?
thanks
In the javascript transformer i could access the Source Directory given in the Source Tab of mirth by
var xmlDirectoryName = sourceMap.get("fileDirectory");
likewise how do i access the destination file directory from javascript?
thanks
Assuming you're using a 3.X version, you can iterate through your channel's destination properties to find the one you want based off the name and get the "Host" property of that destination.
var CHANNEL_ID = "CHANNEL ID";
var DESTINATION_NAME = "DESTINATION NAME"
var destinationDirectory = "";
for each (destination in com.mirth.connect.server.controllers.DefaultChannelController.create().getDeployedChannelById(CHANNEL_ID).getDestinationConnectors().toArray()) {
if (destination.getName() == DESTINATION_NAME) {
destinationDirectory = destination.getProperties().getHost();
break;
}
}