In Source node, check the box for Run preprocessing script... Select "only messages that fail to parse."
var rawMessage = new java.lang.String(bytesIn, 'UTF-8');
var lines = rawMessage.split("\\r\\n?"); // HL7 - CR plus LF if it is present
var newMessage = "";
for (var i = 0; i < lines.length; i++) {
var currentLine = lines[i];
var lineEnding = "\r";
if (i === 0) {
// if first line, don't include a line ending.
lineEnding = "";
}
try {
var parsedHl7Line = qie.parseHL7String(currentLine);
} catch (err) {
// if failed to parse, don't include a line ending.
lineEnding = "";
}
newMessage += lineEnding + currentLine;
}
bytesOut = new java.lang.String(newMessage).getBytes("UTF-8");

Here is a link to a sample channel for testing the above. The channel contains two sample HL7 messages: one is valid and the other is invalid.