Sunday, October 10, 2004

BizTalk 2004:
Interesting problem. A requirement exists where records on destination side of map must be in specific order, and where data is empty, there must exist an empty record.

Such that the left side contains:
< record >
     < fee1 > 100.0 </fee1 >
     < fee2 > 200.0 </fee2 >
     < fee3 > 00.0 </fee3 >
< /record >

And the right side must end up thusly:

< record >
     < orderid > 1 < /orderid >
     < typeid > fee2 < /typeid >
     < dest > 200.0 < /dest >
< /record >
< record >
     < orderid > 2 < /orderid >
     < typeid > fee1 < /typeid >
     < dest > 100.0 < /dest >
< /record >
< record >
     < orderid > 3 < /orderid >
     < typeid > fee3 < /typeid >
     < dest > 300.0 < /dest >
< /record >



The business rule here is that we have the sources fee values, which specify the value of a distinct fee that both systems understand, in a flat field-name-based structure, and the destination in a hierarchiacal and ordered structure. That is to say that the destination requires fee1 to be the second RECORD in the group.

I think I have an idea about how to do this, it involves using table extractors and some funky looping. I'll update you once I have tested this out.

Chris Tucker