BizTalk Server Orchestration - Specifying filename on Send port

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server Orchestration > March 2006 > Specifying filename on Send port





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 Specifying filename on Send port
Troy Young

2006-03-01, 7:55 am

I have been trying for days to figure out how to specify the name of the
file that gets written by an orchestration to a send port.

I've tried using the %SourceFileName% macro, and stopped and restarted the
macro and the BizTalk service over and over, but all I get is a file named
"%SourceFileName%".

My scenario:
- My orchestration is very simple: Just a static FILE receive (late-bound),
a Transform (with a map that translates a flat file to XML), and a static
FILE send shape (also late-bound).
- The map is fairly complex, but I wouldn't think that that would matter.
- The receive port uses a simple custom pipeline (with nothing but a flat
file disassembler), and the send port uses the standard XML pipeline.

Since both the receive shape and the send shape are FILE type, shouldn't
%SourceFileName% work? I must be missing something very simple.

(Once I can get the send port to respect %SourceFileName%, I don't think
I'll have any trouble using a distinguished field to build my own filename.)

Thanks,
Troy


Troy Young

2006-03-01, 7:55 am

BTW, I've tried adding a MessageAssign shape after the transform, with the
following expression:
AmdsClaimEdit1 = AmdsClaimEdit;
AmdsClaimEdit1(FILE.ReceivedFileName) = "myfile.txt";

My hope was that if I could at least set
AmdsClaimEdit1("FILE.ReceivedFileName") to a fixed filename, then I could
easily take the next step and build the file name using distinguished
fields.

"Troy Young" <troysterr@nospam.nospam> wrote in message
news:uAv2F9HPGHA.2604@TK2MSFTNGP09.phx.gbl...
>I have been trying for days to figure out how to specify the name of the
>file that gets written by an orchestration to a send port.
>
> I've tried using the %SourceFileName% macro, and stopped and restarted the
> macro and the BizTalk service over and over, but all I get is a file named
> "%SourceFileName%".
>
> My scenario:
> - My orchestration is very simple: Just a static FILE receive
> (late-bound), a Transform (with a map that translates a flat file to XML),
> and a static FILE send shape (also late-bound).
> - The map is fairly complex, but I wouldn't think that that would matter.
> - The receive port uses a simple custom pipeline (with nothing but a flat
> file disassembler), and the send port uses the standard XML pipeline.
>
> Since both the receive shape and the send shape are FILE type, shouldn't
> %SourceFileName% work? I must be missing something very simple.
>
> (Once I can get the send port to respect %SourceFileName%, I don't think
> I'll have any trouble using a distinguished field to build my own
> filename.)
>
> Thanks,
> Troy
>



BA

2006-03-01, 7:55 am

Troy,

In your orchestration, within a message assignment shape, do you have a statement
like MyResponse_Xml(FILE.ReceivedFileName) = MyRequest_Xml(FILE.ReceivedFileName);

That will set the file name to the file you originally received, you can
set the file name to whatever you want like this.

What I usually do in my port is "%SourceFileName%_%messageid%.xml" for my
output file so its always unique.

BA
http://biztalkia.blogspot.com/


> I have been trying for days to figure out how to specify the name of
> the file that gets written by an orchestration to a send port.
>
> I've tried using the %SourceFileName% macro, and stopped and restarted
> the macro and the BizTalk service over and over, but all I get is a
> file named "%SourceFileName%".
>
> My scenario:
> - My orchestration is very simple: Just a static FILE receive
> (late-bound),
> a Transform (with a map that translates a flat file to XML), and a
> static
> FILE send shape (also late-bound).
> - The map is fairly complex, but I wouldn't think that that would
> matter.
> - The receive port uses a simple custom pipeline (with nothing but a
> flat
> file disassembler), and the send port uses the standard XML pipeline.
> Since both the receive shape and the send shape are FILE type,
> shouldn't %SourceFileName% work? I must be missing something very
> simple.
>
> (Once I can get the send port to respect %SourceFileName%, I don't
> think I'll have any trouble using a distinguished field to build my
> own filename.)
>
> Thanks,
> Troy



BA

2006-03-01, 7:55 am


I posted as your 2nd post came in :-) Seems you have already tried that.

Consider this blog posting, might help:

http://geekswithblogs.net/nparker/a...0/26/13268.aspx

BA
http://biztalkia.blogspot.com/

[vbcol=seagreen]
> BTW, I've tried adding a MessageAssign shape after the transform, with
> the
> following expression:
> AmdsClaimEdit1 = AmdsClaimEdit;
> AmdsClaimEdit1(FILE.ReceivedFileName) = "myfile.txt";
> My hope was that if I could at least set
> AmdsClaimEdit1("FILE.ReceivedFileName") to a fixed filename, then I
> could easily take the next step and build the file name using
> distinguished fields.
>
> "Troy Young" <troysterr@nospam.nospam> wrote in message
> news:uAv2F9HPGHA.2604@TK2MSFTNGP09.phx.gbl...
>


Troy Young

2006-03-01, 7:55 am

Well, I was right--it was just a dumb mistake. Instead of adding the
MessageAssign shape inside the Construct shape, I was adding a new one
outside of it.

Thanks,
Troy



"BA" <biztalk.architect@gmail.com> wrote in message
news:7127ff7b151a58c80aa1428aee5e@news.microsoft.com...
>
> I posted as your 2nd post came in :-) Seems you have already tried that.
>
> Consider this blog posting, might help:
>
> http://geekswithblogs.net/nparker/a...0/26/13268.aspx
>
> BA
> http://biztalkia.blogspot.com/
>





WenJun Zhang[msft]

2006-03-01, 7:55 am

FYI, a list of all the available Macros of output filename:

Restrictions on Using Macros in File Names
http://msdn.microsoft.com/library/d...ary/en-us/opera
tions/htm/ebiz_ops_adapt_file_zdax.asp

Best regards,

WenJun Zhang
Microsoft Online Partner Support

This posting is provided "AS IS" with no warranties, and confers no rights.



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com