Recently on a project I was required to filter out single records from a large batch that were not required to be processed inside the business process.  In this case, the vast majority of the thousands of input records would not be required in the Orchestration.



Rather the load the whole document into the Orchestration or break the document up into single messages, I decided to just suppress the non-required nodes in the mapper.  This would greatly reduce the number of input records into the system.



The mapper in BizTalk 2004 makes it easy to suppress nodes inside the mapper.  The key is to send the looping node a “false” from a Logical Functoid.  I have tried sending a Boolean False value from a Scripting Functoid but that was unsuccessful. 



This would look like this:





In this case, if the Logical Equals is “false” the Info node will not be created.  This can be very handy if you want to suppress records for items that are out of stock or for records that do not need to be processed inside the Orchestration.



Note that in this case the Looping Functoid is not required.  Removing it does not change the results.  The Node is still suppressed if the Logical Equals returns “false”.  I always include the Looping Functoid when looping records.



I have put together a sample that shows a simple suppression and a more complex scenario. 



Download: Suppress Nodes Sample