| Author |
%document_name% parameter
|
|
| Neil Hewitt 2004-07-27, 5:53 pm |
| i have treied to use the %document_name% parameter as the Target File name in a port using the FTP transport property but the file name gets changed to the actual name %document_name%.txt not the original document name.
is there a problem with this parameter ?
i have used %datetime%.txt and there is not problem.
Thanks
Neil
| |
| Tim Riley 2004-07-28, 2:55 am |
| Neil,
You need ot have a look in the BizTalk documentation for the macros that the
file adapter supports (see:
ms-help://BTS_2004/Operations/htm/ebiz_ops_adapt_file_zdax.htm). If you
want to maintain the name of the file that was received by BizTalk, you can
use %SourceFileName%. If you want to set the filename programmatically
(e.g. from Orchestration or pipeline) you can set the
bts_file_properties.ReceivedFileName context property and this will be used
when the file is sent using either the FILE or the FTP adapter.
Tim
"Neil Hewitt" <NeilHewitt@discussions.microsoft.com> wrote in message
news:D7EC25D8-0335-49D5-8597-A6EC31E36821@microsoft.com...
> i have treied to use the %document_name% parameter as the Target File name
in a port using the FTP transport property but the file name gets changed to
the actual name %document_name%.txt not the original document name.
>
> is there a problem with this parameter ?
>
> i have used %datetime%.txt and there is not problem.
>
> Thanks
> Neil
| |
| Neil Hewitt 2004-07-28, 6:09 pm |
| I tried the %sourcefilename%.txt as my target file name and the file is actually being transported as '%sourcefilename%.txt'.
i looked up the help on programmatically changing the send port and it metioned that it was only for a FILE transport type. can i do this as an FTP transport type.
how do i go about doing that ? do i change the pipeline or the orchestration ?
"Tim Riley" wrote:
> Neil,
>
> You need ot have a look in the BizTalk documentation for the macros that the
> file adapter supports (see:
> ms-help://BTS_2004/Operations/htm/ebiz_ops_adapt_file_zdax.htm). If you
> want to maintain the name of the file that was received by BizTalk, you can
> use %SourceFileName%. If you want to set the filename programmatically
> (e.g. from Orchestration or pipeline) you can set the
> bts_file_properties.ReceivedFileName context property and this will be used
> when the file is sent using either the FILE or the FTP adapter.
>
> Tim
>
> "Neil Hewitt" <NeilHewitt@discussions.microsoft.com> wrote in message
> news:D7EC25D8-0335-49D5-8597-A6EC31E36821@microsoft.com...
> in a port using the FTP transport property but the file name gets changed to
> the actual name %document_name%.txt not the original document name.
>
>
>
| |
| Yossi Dahan 2004-07-29, 2:49 am |
| As posted a few times lately in this forum the FTP adapter will use the
FILE.ReceivedFileName context property, so if you promoted the filename that
you want to that property it will be used by the FTP adapter
Yossi Dahan
"Neil Hewitt" <NeilHewitt@discussions.microsoft.com> wrote in message
news:89C2AFED-3587-44B4-BE63-40FE58874D6B@microsoft.com...
> I tried the %sourcefilename%.txt as my target file name and the file is
actually being transported as '%sourcefilename%.txt'.
> i looked up the help on programmatically changing the send port and it
metioned that it was only for a FILE transport type. can i do this as an
FTP transport type.
>
> how do i go about doing that ? do i change the pipeline or the
orchestration ?[vbcol=seagreen]
>
>
> "Tim Riley" wrote:
>
the[vbcol=seagreen]
can[vbcol=seagreen]
used[vbcol=seagreen]
name[vbcol=seagreen]
changed to[vbcol=seagreen]
| |
| Tim Riley 2004-07-29, 2:49 am |
| Hi Neil,
Within your orchestration you should be able to set the file name property
by using the FILE.ReceivedFileName property on the message within the
orchestration. You then need to create a dynamic port and this will pick up
the filename from this property. I am pretty sure that the FTP adapter picks
this up as it was something I need to check as part of the current project I
am working on. I must admit I didn't do this using an orchestration, I used
a pipeline component, but I think it will work in either scenario.
Tim
"Neil Hewitt" <NeilHewitt@discussions.microsoft.com> wrote in message
news:89C2AFED-3587-44B4-BE63-40FE58874D6B@microsoft.com...
> I tried the %sourcefilename%.txt as my target file name and the file is
actually being transported as '%sourcefilename%.txt'.
> i looked up the help on programmatically changing the send port and it
metioned that it was only for a FILE transport type. can i do this as an
FTP transport type.
>
> how do i go about doing that ? do i change the pipeline or the
orchestration ?[vbcol=seagreen]
>
>
> "Tim Riley" wrote:
>
the[vbcol=seagreen]
can[vbcol=seagreen]
used[vbcol=seagreen]
name[vbcol=seagreen]
changed to[vbcol=seagreen]
| |
| boveyking 2004-07-29, 11:36 am |
| 1. %sourcefilename% is case sensitve. It should be %SourceFileName%.txt
2. No problem to set the file name in Orchestration. Drop a expression shape and set RecievedFileName to whatever you want. |
|
|
|