Announcement

Collapse
No announcement yet.

postprocessor running on filtered messages?

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

  • postprocessor running on filtered messages?

    I have all messages filtered in a source filter for adt and a01 only, and all other messages are successfully filtered; however, the post processor script is running for EVERY message including the filtered ones resulting in blank data going to the outbound template.

    I thought that if a message was filtered it was discarded and done, but apparently it still fires the postprocessor script anyway.

    Can someone please help me with this?

    Is there a way to only run the postprocessor on unfiltered messages?

    Thanks in advance

    Mirth Connect Server 3.4.0.8000 on Windows 2012 server

  • #2
    postprocessor runs after every message.
    So if u want to check the status of message u can use;

    PHP Code:
    message.getConnectorMessages().get(0).getStatus() 
    Last edited by obsessio; 06-25-2016, 12:47 PM.

    Comment


    • #3
      thank you so much for your response.

      Could you please help a little more?

      What is the returned response on
      Code:
      message.getConnectorMessages().get(0).getStatus()
      is it 'true' 'false' '0' '1' 'processed'.....?

      then something like this?

      Code:
      isFiltered=message.getConnectorMessages().get(0).getStatus()  
      
      if isFiltered=? then runmyscript
      any help is appreciated and thank you in advance.

      Comment


      • #4
        Reponse is "FILTERED"

        Check here for Class and here for Status

        PHP Code:
        if (message.getConnectorMessages().get(0).getStatus() == "FILTERED") {
            
        stuffToDo

        User API for 3.4.1

        Comment

        Working...
        X