web stats
postprocessor running on filtered messages? - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 06-25-2016, 06:30 AM
stormcel stormcel is offline
OBX.3 Kenobi
 
Join Date: Mar 2010
Location: Phoenix
Posts: 160
stormcel is on a distinguished road
Default 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
Reply With Quote
  #2  
Old 06-25-2016, 11:50 AM
obsessio obsessio is offline
OBX.3 Kenobi
 
Join Date: Mar 2015
Location: Turkey
Posts: 166
obsessio is on a distinguished road
Default

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 at 01:47 PM.
Reply With Quote
  #3  
Old 06-26-2016, 04:58 PM
stormcel stormcel is offline
OBX.3 Kenobi
 
Join Date: Mar 2010
Location: Phoenix
Posts: 160
stormcel is on a distinguished road
Default

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.
Reply With Quote
  #4  
Old 06-26-2016, 05:42 PM
obsessio obsessio is offline
OBX.3 Kenobi
 
Join Date: Mar 2015
Location: Turkey
Posts: 166
obsessio is on a distinguished road
Default

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
Reply With Quote
Reply

Tags
filtered, postprocessor

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 06:15 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.
Mirth Corporation