Team Individualism (old blog)

Consultant ramblings

Thursday, June 15, 2006

BizTalk Mapping functoids - conditional output

When trying to conditionally output an element (but not any sub elements) there are a few options in BizTalk 2004.

1) use a logical existance functoid

It only "fires" when the source input exists and it spits out a "true" value. When the true value is input into the target element it tells the mapper whether or not to
create the element

warning: logical existance functoid when looping can cause a polarized loop. It may only loop for the first element - check my previous posts

2) use a record count functoid

it fires whether or not the source input element exists and spits out an integer.
Used in combination with a greater than or equals logical functoid you can control the creation of an element

warning: If you are looping and you are looking at a sub element this may return the record count of all sub elements, which may not be what you are looking for

3) use a string size functoid

it fires whether or not the source input element exists and spits out an integer.
Used in combination with a greater than or equals logical functoid you can control the creation of an element.

Unlike option 2 it only fires for the specific sub element. Unlike option 1 it can provide a "does it exist or not" functionality. This is particularly useful when you want to set values of other elements based on non-existance.

0 Comments:

Post a Comment

<< Home