Name: |
Don't over complicate your map
|
Description: |
I was recently looking at a BizTalk map which had a bug in it and one of the things that I notices was that the developer had strung together a number of functoids to do some logic in the map. We were talking about 12 functoids being used to workout which value should be in the output field.
I think sometimes developers are a little frightened to drop into .net code feeling that it is perhaps not the BizTalk way. In this case the logic could have been executed in a .net assembly with about 4 lines of code and called via the scripting functoid.
I'm not saying that you should not use the out of the box functoids but I think there is a balance where making a very complicated stringing together of functoids should be a trigger to yourself to question if there could be a simpler way to achieve what your trying to do. |
Symptoms: |
|
Pain: |
|
Cure: |
- The first thing to do is ensure that you recognize that it is complicated. If this is the case I would recommend asking a colleague to review your map and to see if they find it easy to understand. If they don't then you have some work to do
- By putting the logic in our case in a .net class we could easily test it with some unit tests to ensure the logic is rock solid before it gets anywhere near the map
|
Just as a point to note on this post, there is also the excellent and similar post about the Everything but the kitchen sink anti pattern used in maps. The difference between my post and that post is that I am saying just use the scripting functiod if you need to so that your map doesnt become overly complicated. The other post is saying dont put things in a map if they dont belong in a map.
That post is available on the following link:
http://blogs.msdn.com/b/ebattalio/archive/2006/11/16/anti-pattern-kitchen-sink-maps.aspx