Freigeben über


BizTalk Mapper: If...Then...Else

It's unbelievable there is no a "If..Then..Else" functoid in BizTAlk Mapper, however, you can combine some functoid to archive it if you dislike to write any code.

Below is the solution for "If source node exist, Then directly link with distination node, Else set a null to destination node" :
1, Drag  a Logical Existence functoid and Value Mapping functoid onto the map surface, then connect them.

2, Drag a Logical NOT functoid and another Value Mapping functoid onto the map surface, then connect them.

As shown as below.

 

Another important thing is for Flattern Value Mapping(Yellow circle), in this case, if the parent Node or record (N_Name_S41) doesn't exist in source message, you would use Flattern Value Mapping, if not, you will get blank message when you test map.

Comments

  • Anonymous
    March 14, 2007
    The comment has been removed

  • Anonymous
    April 03, 2007
    You can use something like this in a .net assembly and call it by scripting functoid. Sample use: Function Call: DateFormatConversion Parm 1: DTM02+DTM03 Parm 2: yyyyMMddHHmm Parm 3: yyyy-MM-ddTHH:mm:ss .... Kerrey

  • Anonymous
    October 08, 2007
    Just use Script,It can make the same as your solution,and more than .

  • Anonymous
    September 28, 2009
    Hi, I have a same requirment but sometimes i get input Xml data to be of repeating data ..suppose data of two employees ...<EmpDetails><id>1234<id><EmpDetails><EmpDetails><id>7656<id><EmpDetails> ..with above map logic how can i implement this senario.. Thanks Sandeep