Tuesday, November 13, 2012

Using Logical Existence functoid to remove empty node generation in BizTalk Mapper.

Generation of empty node in our XML is a common problem. We can halt the generation of empty nodes in BizTalk Mapper by the use of Logical Existence functiod.

Scenario :
                   Suppose we have to map the Customer's details. We have two records i.e. Customer (which contains header details) and Customer_Details (which contains details) in source schema. In destination schema we have three records i.e. Customer_Header, Customer_Details and ShippingAddress.

Now suppose that the source schema record Customer_Details is not mandatory so can be present or not, and it is mapped to Customer_Details and Address records of Destination Schema.
Now when the source schema record Customer_Details is not present then it creates the empty records.

Source Schema :

Destination Schema :

Input XML file without Customer_Details record :

<ns0:Customer_Data xmlns:ns0="http://Using_LogicalExistense.Customer_SourceSchema">

Map without Logical existence :

Output after Test Map using above XML file :

In the above result Cusomer_Details and ShippingAddress are generating empty.Mapping the Logical Existence functiod to these records that are generating empty solves our problem.

Map after using logical existence functiod :

Result After Test Map and using Logical Existence :

What Logical Existence does ?

The logical functiod is used to determine whether the RecordField Element, or Field Attribute node that is linked to it exists in a particular input instance message. If functiod evaluates to true then destination schema node is generated otherwise not.


  1. Hey Hi Rahul....
    n thanx for the post ....
    and I also want to know about how SSIS...
    Can we trigger SSIS from Biztalk ?


  2. thanks Rahul!!! this helped me solve an issue.