|
Home > Archive > BizTalk Server General > June 2006 > %Filename% doesn't work when using the SharePoint adapter and no orchestration
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 |
%Filename% doesn't work when using the SharePoint adapter and no orchestration
|
|
|
| I am using the File Adapter to pick up a file at a specified file folder. I
am using the SharePoint Adapter to place this same file onto the Share Point
site. I want the filename of the file at the folder location to be the same
when placed onto the Share Point site. I am not using an orchestration, but
am simply using a configured Receive Location and Send Port.
The File Adapter picks up the file correctly. I have configured the
SharePoint Adapter to use %Filename% as the Filename property and have
configured BTS.ReceivePortName correctly. I have also tried leaving the
Filename property blank.
The problem is that the SharePoint adapter uses 'Msg-%MessageID%.xml' as the
Filename and not the name of the actual file picked up from the FileAdapter.
Is this because I am not using an orchestration?
From the MS docs:
Filename (Optional) The Windows SharePoint Services filename. You can type
in a literal value like 'PurchaseOrder0001.xml' or an expression.
Expressions can include any mix of literals, macros and XPATH queries, ex:
"PurchOrd-%XPATH=//po:PurchaseOrderId%-%MessageID%.xml". When no file name
is supplied, the file name will be the name of the original file, the value
supplied by the orchestration, or 'Msg-%MessageID%.xml' if the orchestration
does not define the file name.
| |
| Adrian Hamza [MSFT] 2006-06-30, 1:19 pm |
| This is By Design. The %Filename% macro is replaced with the name of the
SharePoint file (and not with the name of a file on disk). If the message
was received through FILE adapter then the %Filename% macro is probably
replaced with empty string. Macros (like %Filename%) and context properties
(like WSS.Filename) are implemented by each adapter separately, they are
specific to each adapter, and there is no 'framework' that would provide
unified macro/context property accross all adapters. Coincidently, some
adapters have used the same macro name ( I would guess %Filename% is a
common one) and ocasionally the same context property.
You can use an orchestration or a custom pipeline to workaround this. All
you need to do is get the disk file name from FILE.ReceivedFileName
property and save it in the WSS.Filename property like below. Make sure
that the Filename field in the send port UI dialog box is left empty so
that the value supplied through the context property WSS.Filename is used
to set the filename.
sharepointOutgoingMsg(WSS.Filename) =
diskIncomingMsg(FILE.ReceivedFileName);
http://msdn.microsoft.com/library/e...1ff50fb8-7ba0-4
7b8-9476-d57413989346.asp?frame=true
http://msdn.microsoft.com/library/e...c5ae5339-67bf-4
fde-a721-5b1aa3b9caca.asp?frame=true
This posting is provided "AS IS" with no warranties, and confers no rights.
Adrian Hamza [MSFT]
http://blogs.msdn.com/ahamza/
My blog on BizTalk 2006
Windows SharePoint Services adapter
--------------------[vbcol=seagreen]
orchestration[vbcol=seagreen]
I[vbcol=seagreen]
Point[vbcol=seagreen]
same[vbcol=seagreen]
but[vbcol=seagreen]
the[vbcol=seagreen]
FileAdapter.[vbcol=seagreen]
type[vbcol=seagreen]
ex:[vbcol=seagreen]
name[vbcol=seagreen]
value[vbcol=seagreen]
orchestration[vbcol=seagreen]
| |
|
| Thanks a lot - that's great information.
"Adrian Hamza [MSFT]" <adrianhamza@online.microsoft.com> wrote in message
news:bKiilmGnGHA.5892@TK2MSFTNGXA01.phx.gbl...
> This is By Design. The %Filename% macro is replaced with the name of the
> SharePoint file (and not with the name of a file on disk). If the message
> was received through FILE adapter then the %Filename% macro is probably
> replaced with empty string. Macros (like %Filename%) and context
> properties
> (like WSS.Filename) are implemented by each adapter separately, they are
> specific to each adapter, and there is no 'framework' that would provide
> unified macro/context property accross all adapters. Coincidently, some
> adapters have used the same macro name ( I would guess %Filename% is a
> common one) and ocasionally the same context property.
>
> You can use an orchestration or a custom pipeline to workaround this. All
> you need to do is get the disk file name from FILE.ReceivedFileName
> property and save it in the WSS.Filename property like below. Make sure
> that the Filename field in the send port UI dialog box is left empty so
> that the value supplied through the context property WSS.Filename is used
> to set the filename.
> sharepointOutgoingMsg(WSS.Filename) =
> diskIncomingMsg(FILE.ReceivedFileName);
>
> http://msdn.microsoft.com/library/e...1ff50fb8-7ba0-4
> 7b8-9476-d57413989346.asp?frame=true
> http://msdn.microsoft.com/library/e...c5ae5339-67bf-4
> fde-a721-5b1aa3b9caca.asp?frame=true
>
>
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
>
> Adrian Hamza [MSFT]
> http://blogs.msdn.com/ahamza/
> My blog on BizTalk 2006
> Windows SharePoint Services adapter
>
> --------------------
> orchestration
> I
> Point
> same
> but
> the
> FileAdapter.
> type
> ex:
> name
> value
> orchestration
>
| |
| Adrian Hamza [MSFT] 2006-06-30, 1:19 pm |
| I've seen this issue raised a couple of times before so I posted an entry
on my blog about this
http://blogs.msdn.com/ahamza/archiv.../30/652551.aspx
This posting is provided "AS IS" with no warranties, and confers no rights.
Adrian Hamza [MSFT]
http://blogs.msdn.com/ahamza/
My blog on BizTalk 2006
Windows SharePoint Services adapter
--------------------[vbcol=seagreen]
orchestration[vbcol=seagreen]
I[vbcol=seagreen]
Point[vbcol=seagreen]
same[vbcol=seagreen]
but[vbcol=seagreen]
the[vbcol=seagreen]
FileAdapter.[vbcol=seagreen]
type[vbcol=seagreen]
ex:[vbcol=seagreen]
name[vbcol=seagreen]
value[vbcol=seagreen]
orchestration[vbcol=seagreen]
|
|
|
|
|