Announcement

Collapse
No announcement yet.

Response Transformer - Error TypeError: Cannot read property "MSA.1" from undefined

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

  • Response Transformer - Error TypeError: Cannot read property "MSA.1" from undefined

    Hi all,

    I want to add a filter so that only AE type messages are routed to my response channel but I seem to be getting error "TypeError: Cannot read property "MSA.1" from undefined"

    Anyone know why it's failing?

    Code:
    var AckResponsePro = globalChannelMap.get('AckResponseProcessor');
    var hl7Response = SerializerFactory.getSerializer('HL7V2').fromXML(t mp);
    
    
    var msa1 = hl7Response['MSA']['MSA.1']['MSA.1.1'].toString();
    
    if (msa1 == 'AE') {
    
    router.routeMessage(AckResponsePro, hl7Response);
    
    } else {
    
    return false;
    
    }

  • #2
    Ah it was a simple change and is now working as expected! Changed hl7Response to tmp!

    Comment

    Working...
    X