BizTalk Server Orchestration - Copy Mode in Dynamic Send

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server Orchestration > June 2006 > Copy Mode in Dynamic Send





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 Copy Mode in Dynamic Send
Michael Krok

2006-05-05, 1:15 pm

Anyone know of a way to set the copy mode (let's say append) to a dynamic
send port? I have an orchestration that while looping through a nodelist,
sends individual messages to a dynamic send port (file adapter specified in
address) However I need to append these messages together into an exisitng
file.

Thanks
--
Michael Krok
President
Mallard Solutions LLC
Microsoft Certified Partner
Greg Forsythe

2006-05-06, 1:18 am

Your could try:
outputMessage(FILE.CopyMode) = 0;

Or alternatively use a map to produce a single output message, which would
be more efficient.

Greg

"Michael Krok" <TheDuck@newsgroup.nospam> wrote in message
news:1612D2D9-564B-45CF-B09C-82A196CE9D47@microsoft.com...
> Anyone know of a way to set the copy mode (let's say append) to a dynamic
> send port? I have an orchestration that while looping through a nodelist,
> sends individual messages to a dynamic send port (file adapter specified
> in
> address) However I need to append these messages together into an
> exisitng
> file.
>
> Thanks
> --
> Michael Krok
> President
> Mallard Solutions LLC
> Microsoft Certified Partner



Michael Krok

2006-05-06, 1:18 am

Thanks Greg,

I'll give outputFile(FILE.CopyMode = 0) first, but I'm interested in how
this can be accomplished in a map. Can you elaborate or point me to an
example? My message is a very simple (300 character fixed flatfile record)
structure but I'm not real sure where to start with the map solution.


--
Michael Krok
President
Mallard Solutions LLC
Microsoft Certified Partner


"Greg Forsythe" wrote:

> Your could try:
> outputMessage(FILE.CopyMode) = 0;
>
> Or alternatively use a map to produce a single output message, which would
> be more efficient.
>
> Greg
>
> "Michael Krok" <TheDuck@newsgroup.nospam> wrote in message
> news:1612D2D9-564B-45CF-B09C-82A196CE9D47@microsoft.com...
>
>
>

Greg Forsythe

2006-05-06, 1:18 am

It sounds like you have an input message containing lots of records, which
you loop thru to produce many output messages that get appended to a single
file.
You should be able to output a message containing all records into a single
file, rather than looping through a nodelist.

What does the loop achieve? Are you filtering records?

Greg

"Michael Krok" <TheDuck@newsgroup.nospam> wrote in message
news:1443D8C5-5B94-45F7-AC00-0171653689CA@microsoft.com...[vbcol=seagreen]
> Thanks Greg,
>
> I'll give outputFile(FILE.CopyMode = 0) first, but I'm interested in how
> this can be accomplished in a map. Can you elaborate or point me to an
> example? My message is a very simple (300 character fixed flatfile
> record)
> structure but I'm not real sure where to start with the map solution.
>
>
> --
> Michael Krok
> President
> Mallard Solutions LLC
> Microsoft Certified Partner
>
>
> "Greg Forsythe" wrote:
>


Michael Krok

2006-05-06, 1:14 pm

The first node in the nodelist is the header and it goes to a send port
group, that is where the files get created and the one I would like to append
to. The destination files all have the same name, but are in different
foldrs. Then I loop through each node, examines the current node and the
next node, extract some values, and do a SQL lookup to determine destination
for the dynamic send port. This logic repeats until the end of the nodelist
along with a bunch of other logic. The dynamic send is used so I don;t need
all the static send ports. I think I could do this with static send ports
and filters but there requirement could be for hundreds of destinations and
we don;t want the maintenance, besides the filters would get terribly
complex. Again too much maintenance.

Thanks sfor your respoinse let me know about the map solution. I'll be on
vacation this week but I'll check back when I'm home.

--
Michael Krok
President
Mallard Solutions LLC
Microsoft Certified Partner


"Greg Forsythe" wrote:

> It sounds like you have an input message containing lots of records, which
> you loop thru to produce many output messages that get appended to a single
> file.
> You should be able to output a message containing all records into a single
> file, rather than looping through a nodelist.
>
> What does the loop achieve? Are you filtering records?
>
> Greg
>
> "Michael Krok" <TheDuck@newsgroup.nospam> wrote in message
> news:1443D8C5-5B94-45F7-AC00-0171653689CA@microsoft.com...
>
>
>

Greg Forsythe

2006-05-07, 7:13 pm

Given the dynamic nature of what you are doing your looping file appends may
be the best way.

Another way would be to have a map to group like nodes and then debatch into
messages that can be output as a single file.
The map would be custom XSLT using the <xsl:key> element to do the grouping
assuming there is an element or elements within each node that can be
grouped. I see you use an SQL lookup to determine the output directory,
which is your current grouping mechanism. How does that work?
The debatching can be done using xpath within a loop or calling a receive
pipeline from within the orchestration


Greg


"Michael Krok" <TheDuck@newsgroup.nospam> wrote in message
news:A9F6962E-C3C1-4948-AC82-A15C60FD6BF4@microsoft.com...[vbcol=seagreen]
> The first node in the nodelist is the header and it goes to a send port
> group, that is where the files get created and the one I would like to
> append
> to. The destination files all have the same name, but are in different
> foldrs. Then I loop through each node, examines the current node and the
> next node, extract some values, and do a SQL lookup to determine
> destination
> for the dynamic send port. This logic repeats until the end of the
> nodelist
> along with a bunch of other logic. The dynamic send is used so I don;t
> need
> all the static send ports. I think I could do this with static send ports
> and filters but there requirement could be for hundreds of destinations
> and
> we don;t want the maintenance, besides the filters would get terribly
> complex. Again too much maintenance.
>
> Thanks sfor your respoinse let me know about the map solution. I'll be on
> vacation this week but I'll check back when I'm home.
>
> --
> Michael Krok
> President
> Mallard Solutions LLC
> Microsoft Certified Partner
>
>
> "Greg Forsythe" wrote:
>


Michael Krok

2006-05-08, 7:14 pm

I don;t really have anyting in the input message to group by, not easily.
there is logic here that needs to examine the curent node, and then very next
node, for a combination of values in certain fields. After that complex
logic has been determined, I call a SQL procedure that takes in some of this
data and then retruns tha exact output path for the curent node. The SQL
call is in a custom .NET assembly since I could not put both ends of a
request/response in an atomic scope needed for the nodelist.

Bottom line, the grouping data for a map is there but probobly too complex
to try and figure out. The destination path is alos not in the message in
ant shape, it has to be looked up. I'll see if I can append to this file, if
not I may just have to write to static message queues for temporary storage
or something like that.

Thanks
--
Michael Krok
President
Mallard Solutions LLC
Microsoft Certified Partner


"Greg Forsythe" wrote:

> Given the dynamic nature of what you are doing your looping file appends may
> be the best way.
>
> Another way would be to have a map to group like nodes and then debatch into
> messages that can be output as a single file.
> The map would be custom XSLT using the <xsl:key> element to do the grouping
> assuming there is an element or elements within each node that can be
> grouped. I see you use an SQL lookup to determine the output directory,
> which is your current grouping mechanism. How does that work?
> The debatching can be done using xpath within a loop or calling a receive
> pipeline from within the orchestration
>
>
> Greg
>
>
> "Michael Krok" <TheDuck@newsgroup.nospam> wrote in message
> news:A9F6962E-C3C1-4948-AC82-A15C60FD6BF4@microsoft.com...
>
>
>

Michael Krok

2006-05-18, 7:14 pm

Greg,

Thanks for the suggestion for copy mode. This does in fact work. I just
happened to put the code before I set the address on the port and the
behavior was to append to the file. I no longer get the error that the file
exists.

MyMessage(FILE.CopyMode) = 0;
DynamicSendPort(Microsoft.XLANGs.BaseTypes.Address) = "file://c:\out\" +
FileName;

Thanks
--
Michael Krok
President
Mallard Solutions LLC
Microsoft Certified Partner


"Greg Forsythe" wrote:

> Given the dynamic nature of what you are doing your looping file appends may
> be the best way.
>
> Another way would be to have a map to group like nodes and then debatch into
> messages that can be output as a single file.
> The map would be custom XSLT using the <xsl:key> element to do the grouping
> assuming there is an element or elements within each node that can be
> grouped. I see you use an SQL lookup to determine the output directory,
> which is your current grouping mechanism. How does that work?
> The debatching can be done using xpath within a loop or calling a receive
> pipeline from within the orchestration
>
>
> Greg
>
>
> "Michael Krok" <TheDuck@newsgroup.nospam> wrote in message
> news:A9F6962E-C3C1-4948-AC82-A15C60FD6BF4@microsoft.com...
>
>
>

Silvia

2006-06-19, 7:18 am

My case is similare, I also use dynamic port
( DynamicSendPort (Microsoft.XLANGs.BaseTypes.Address)=
“file://c:\percorsofile\nomefile") and
MsgOutput(FILE.CopyMode)= 0

The first line is write correctly, when it wrote the second appears
"The FILE send adapter cannot open file for writing. Details The file exists."

Which can be it the difference?
Thank in advance for your response.
Silvia

"Michael Krok" wrote:
[vbcol=seagreen]
> Greg,
>
> Thanks for the suggestion for copy mode. This does in fact work. I just
> happened to put the code before I set the address on the port and the
> behavior was to append to the file. I no longer get the error that the file
> exists.
>
> MyMessage(FILE.CopyMode) = 0;
> DynamicSendPort(Microsoft.XLANGs.BaseTypes.Address) = "file://c:\out\" +
> FileName;
>
> Thanks
> --
> Michael Krok
> President
> Mallard Solutions LLC
> Microsoft Certified Partner
>
>
> "Greg Forsythe" wrote:
>
Michael Krok

2006-06-19, 1:18 pm

Try putting the line
MsgOutput(FILE.CopyMode)= 0

before the line you use to set the address. Make sure you restart the host
instance for your orchestration also.

--
Michael Krok
President
Mallard Solutions LLC
Microsoft Certified Partner


"Silvia" wrote:
[vbcol=seagreen]
> My case is similare, I also use dynamic port
> ( DynamicSendPort (Microsoft.XLANGs.BaseTypes.Address)=
> “file://c:\percorsofile\nomefile") and
> MsgOutput(FILE.CopyMode)= 0
>
> The first line is write correctly, when it wrote the second appears
> "The FILE send adapter cannot open file for writing. Details The file exists."
>
> Which can be it the difference?
> Thank in advance for your response.
> Silvia
>
> "Michael Krok" wrote:
>
Silvia

2006-06-20, 1:18 pm

Thank you very much it work correctly
Silvia

"Michael Krok" wrote:
[vbcol=seagreen]
> Try putting the line
> MsgOutput(FILE.CopyMode)= 0
>
> before the line you use to set the address. Make sure you restart the host
> instance for your orchestration also.
>
> --
> Michael Krok
> President
> Mallard Solutions LLC
> Microsoft Certified Partner
>
>
> "Silvia" wrote:
>
Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com