Announcement

Collapse
No announcement yet.

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