BizTalk Server General - Changing Receive port address dynamically

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server General > May 2006 > Changing Receive port address dynamically





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Changing Receive port address dynamically
Yaniv Rahimi

2006-05-23, 1:15 pm

Hello,

I'm trying to find out how to change address of receive port dynamically
(like it can be done for dynamic send port)... Is there is any way to do it?
If yes - how? If not, how I can implement following logic:
Let's say an orchestration receives some XML message, which also have an
information about additional file (for example Word Document, or PDF
document) in one of its fields.
From received XML message orchestration knows the FileName and FileLocation
of this additional file and there is additional message type
(System.Xml.XmlDocument type) to get this second file. This second file
should been routed to some send port untouched.

There is no problem to parse first XML message, to receive FileName and
FileLocation from it, no problem to route 'file contained' message via
"Microsoft.BizTalk.DefaultPipelines.PassThruTransmit" to its final
destination. The only problem is to get this file dynamicly, based on data
received by orchestration. Is there is any way to do it in orchestration?
I'm aware about possability to perform all logic of copying file from
FileLocation to its final destination in an external assembly, but trying to
stay in orchestration.

Thanks for help!
Scott Colestock

2006-05-23, 7:15 pm

I guess if the additional file is available on, say, a UNC share that is
accessible to the orchestration host, I wouldn't necessarily shy away from
using the static Copy method on the File class to copy the file to a
location where you have a receive location watching.

There isn't really a clean alternative that I can think of - you wouldn't
want to use wmi/OM to be altering a receive location at run time, for
instance (that would only work if your orchestrations ran serially, and even
then it sounds like a bad idea.)

Scott Colestock
www.traceofthought.net


"Yaniv Rahimi" <Yaniv.Rahimi@newsgroup.nospam> wrote in message
news:4529ACF8-FF97-429C-A60F-FB24E3EE671A@microsoft.com...
> Hello,
>
> I'm trying to find out how to change address of receive port dynamically
> (like it can be done for dynamic send port)... Is there is any way to do
> it?
> If yes - how? If not, how I can implement following logic:
> Let's say an orchestration receives some XML message, which also have an
> information about additional file (for example Word Document, or PDF
> document) in one of its fields.
> From received XML message orchestration knows the FileName and
> FileLocation
> of this additional file and there is additional message type
> (System.Xml.XmlDocument type) to get this second file. This second file
> should been routed to some send port untouched.
>
> There is no problem to parse first XML message, to receive FileName and
> FileLocation from it, no problem to route 'file contained' message via
> "Microsoft.BizTalk.DefaultPipelines.PassThruTransmit" to its final
> destination. The only problem is to get this file dynamicly, based on data
> received by orchestration. Is there is any way to do it in orchestration?
> I'm aware about possability to perform all logic of copying file from
> FileLocation to its final destination in an external assembly, but trying
> to
> stay in orchestration.
>
> Thanks for help!



Yaniv Rahimi

2006-05-24, 7:15 am

Hi Scott,

The receive location is already watching on this share. The main problem is
to have receive port to get VERY SPECIFIC file. The file itself is being
created in shared folder, and it's name is being populated in XML (main)
message. My problem is how to get this specific known (one and only one) file
from known location. Can you think of any kind of correlation, which I can
make between them? Is there any way to make correlation between one of XML
Message fields and %SourceFileName% of additional message?

Thanks for help.

"Scott Colestock" wrote:

> I guess if the additional file is available on, say, a UNC share that is
> accessible to the orchestration host, I wouldn't necessarily shy away from
> using the static Copy method on the File class to copy the file to a
> location where you have a receive location watching.
>
> There isn't really a clean alternative that I can think of - you wouldn't
> want to use wmi/OM to be altering a receive location at run time, for
> instance (that would only work if your orchestrations ran serially, and even
> then it sounds like a bad idea.)
>
> Scott Colestock
> www.traceofthought.net
>
>
> "Yaniv Rahimi" <Yaniv.Rahimi@newsgroup.nospam> wrote in message
> news:4529ACF8-FF97-429C-A60F-FB24E3EE671A@microsoft.com...
>
>
>

Dinesh

2006-05-24, 7:15 am

Not sure whether you have thought about this option
Why not calling a .NET component within the orchestration to do file
handling mechanism.You can read and write the file to any location.

Thanks
Dinesh

"Yaniv Rahimi" wrote:
[vbcol=seagreen]
> Hi Scott,
>
> The receive location is already watching on this share. The main problem is
> to have receive port to get VERY SPECIFIC file. The file itself is being
> created in shared folder, and it's name is being populated in XML (main)
> message. My problem is how to get this specific known (one and only one) file
> from known location. Can you think of any kind of correlation, which I can
> make between them? Is there any way to make correlation between one of XML
> Message fields and %SourceFileName% of additional message?
>
> Thanks for help.
>
> "Scott Colestock" wrote:
>
Scott Colestock

2006-05-24, 1:14 pm

Ahhh, now I understand better. You should take a look at the Charles Young
article on "flexible correlation" - you can get this done if you want to...

http://geekswithblogs.net/cyoung/articles/17364.aspx

Consider having a MessageContextBase property in a property schema that you
can use for correlation. Following Charles' guidelines, you will want to
initialize a correlation based on that custom property with the content in
your xml field that contains the file name.

When receiving via the file receive location, you will want to have a custom
receive pipeline that promotes that same custom property with the name of
the file that you are receiving -- so you can have a receive shape in your
orch that follows the correlation.

This will let your orch rendezvous with the correct file...

Scott Colestock
www.traceofthought.net


"Yaniv Rahimi" <Yaniv.Rahimi@newsgroup.nospam> wrote in message
news:5C2B82C1-BB1A-4693-975C-6856FC116C9C@microsoft.com...[vbcol=seagreen]
> Hi Scott,
>
> The receive location is already watching on this share. The main problem
> is
> to have receive port to get VERY SPECIFIC file. The file itself is being
> created in shared folder, and it's name is being populated in XML (main)
> message. My problem is how to get this specific known (one and only one)
> file
> from known location. Can you think of any kind of correlation, which I can
> make between them? Is there any way to make correlation between one of XML
> Message fields and %SourceFileName% of additional message?
>
> Thanks for help.
>
> "Scott Colestock" wrote:
>


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com