04-26-05 07:48 AM
Jake is correct - but you could use this to your advantage. The thing to do
would be to create a property schema and a custom property - you could call
it "FileExt" or whatever you;d like. (make sure to set the Property Schema
Base property to "MessageContextPropertyBase" so that if you do end up using
this from an orchestration the orchestration compiler doesn't complain about
it not being in a message).
Register the property schema. Then create a custom pipeline component that
detects the file extention (you can get the ReceivedFileName from the
context) and then promotes the value you want into the context. You can
then create send ports or use this in an orchestration to route the
messages.
Code might look something like this (likely this won't compile - it is off
the top of my head but hopefully will get you started ) :
IBaseMessage IComponent.Execute(IPipelineContext pc, IBaseMessage msg)
{
string fn =
msg.Context.Read("ReceivedFileName",http://schemas.microsoft.com/BizTal...
em-properties").ToString();
string ext = System.IO.Path.GetExtension(fn);
msg.Context.Promote("FileExt","http://mypropertyschemans",ext);
return msg;
}
--
Jon Flanders
http://www.masteringbiztalk.com/blogs/jon/
"Jake" <RunsInCirclesScreaming_MAPS_@msn.com> wrote in message
news:Xns9643DC509A838RunsInCirclesScream
i@207.46.248.16...
>I hope somebody else will have a better answer, but from what I can tell
> you won't be able to use this approach. The reason it won't work because
> the ReceivedFileName poperty is not promoted, it is just part of the
> message context. I believe a property has to be promoted for the
> MessageBox to use it for routing.
>
> Jake Watkins
> JakeW@nospam-guerillaprogrammer.com
> EAI Architect - MCSD - C#, Web-Services, WSE, BizTalk 2004, SharePoint
> 2003, InfoPath
> Cell - 469-855-5919
>
>
>
>
> nhudson@ndc-inc-dot-com.no-spam.invalid (njhudson) wrote in
> news:dcSdndqC8cL1FvDfRVn_vA@giganews.com:
>
>
[ Post a follow-up to this message ]
|