Announcement

Collapse

Mirth Connect 3.12.0 Released!

Mirth Connect 3.12.0 is now available as an appliance update and on our GitHub page. This release includes database performance improvements, improves visual HL7 representation, message pruning, keystore handling, PDF generation, community contributions, and fixes several security vulnerabilities. This release also contains many improvements to commercial extensions. See the release notes for the list of fixes and updates.

Download | See What's New | Upgrade Guide | Release Notes

For discussion on this release, see this thread.
See more
See less

PostProcessor RouteMessage Question

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

  • PostProcessor RouteMessage Question

    In the PostProcessor, what is the syntax to access the response from a destination? I want to route it to another channel?

    This code will route the original message. How do I route the response?

    Code:
    router.routeMessage('channel name', message);
    Thanks!
    John Lehew

  • #2
    Re:PostProcessor RouteMessage Question

    I figured it out. This sends both the original message which in my case is XML along with the response and response status to another channel.

    Code:
    var responseMessage = responseMap.get('ProcessEvents').getMessage(); 
    var responseStatus = responseMap.get('ProcessEvents').getStatus(); 
    
    var M = message+'<Response>'+responseMessage+'</Response><ResponseStatus>'+responseStatus +'</ResponseStatus>';
    
    router.routeMessage('Channel Name', M);
    Note: 'ProcessEvent' is my destination name

    Regards,
    John

    Post edited by: jlehew, at: 11/01/2007 15:25

    Comment


    • #3
      Re:PostProcessor RouteMessage Question

      Thanks for the example code!
      Chris Lang

      Comment

      Working...
      X