Yet another mapping question

Home Page Forums BizTalk 2004 – BizTalk 2010 Yet another mapping question

Viewing 1 reply thread
  • Author
    Posts
    • #15904

      Both my source and destination schemas have restricted/enumerated attributes but use different values to represent them. For example:

      • Y -> Approved
      • N -> Denied

      So far I'm using a bunch of Equal+Value Mapping functoids to do this, but it seems tedious.  Is there a better/efficient way of doing this?

      Thanks for any input!

       

       

    • #15905

      Actually, yes there is a better way to do this, and the answer is Custom Functoids.  If your example above is very close to the real case you have to deal with I've got even better news.  I've been doing a series of posts on my blog about Custom Functoids and building a library of Custom Functoids one at a time.  The latest is an If … Else functoid which I just posted tonight, you can find the post here:

      http://www.timrayburn.net/2006/09/30/TimRayburnCustomFunctoids+If+Else.aspx

      In the case you describe since the source side is Y/N you could literally just put that value as the boolean check (I use System.Convert.ToBoolean which will figure out that "Y" means true) and then put the constants "Approved" and "Denied" as constants for the second and third parameters.  The result becomes if "Y" then "Approved" is output, else "Denied" is output.

      Even if your input values don't directly map to booleans, it would still save you alot of functoids and increase readability of your maps.

      Tim Rayburn
      Principal Consultant, Sogeti USA LLC
      http://www.TimRayburn.net

Viewing 1 reply thread
  • The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.