Developing pipeline components to promote properties
The question was asked after he looked at this sample and was quite simple really - "Why do I need to worry about developing complicated custom pipeline components to manipulate promoted properties when I can promote properties through the schema or even use distinguished fields in my orchestration?" (well, it's not an exact quote - but that was the meaning, trust me..)
The first thing to remember, generally with BizTalk, not limited to this issue alone, is that you don't always have an orchestration.
It is easy to forget sometimes, especially if you've been doing a lot of orchestration development, that BizTalk is very useful even without any orchestration in sight. personally I did many projects that barely used them.
There are many reasons to use orchestration, but many others why not to, I guess that the obvious rule of thumb is that unless you actually need a workflow, you should question yourself whether you actually need an orchestration.
Which brings up the first point - sometimes all you have to go with is the pipeline, in which case distinguished fields are not useful.
The second point for promoting properties in a custom pipeline component is when you don't
actually want to have a schema for the incoming message (a lot has been written on this, so I'll leave it as a statement only here) or indeed when the incoming message is not xml (and is not parsed to one); in both these cases you will need to have custom logic to determine what to promote, and how to promote it.
Same applies when the rules for promotion are not simple, for instance if they are conditional, or if you need to promote a single instance of a repeating element etc. such cases are not supported by the property promotion declaration in a schema.
Of course you're still limited to promoting a single value to a single promoted property, but you have much more freedom as to how you get this value through custom code.
So - the bottom line is that in many cases you do need to write custom pipeline components to promote information to the message context.
A warning here - while very efficient and effective, custom pipeline components should be written with care - mainly you must ensure they are taking a streaming approach rather the