March 16, 2006 at 5:03 PM #13191
Have you tried it without the Send Port Group.
Set a filter on each Send Port
March 17, 2006 at 8:18 PM #13192
I just did a quick check of the FILE.ReceivedFileName and found it is written to the message context but not promoted. This means you cannot use this property for routing.
You have a number of options:
1. Write a simple pipeline component that takes the FILE.ReceivedFileName and extracts the filename and promotes this into your own property
2. Use an orchestration with a dynamc send port. This will contain logic to assign the output location based on filename.
For speed and flexibility at runtime the pipeline component will be best.
March 20, 2006 at 11:57 AM #13193
First you need to create a Biztalk project, with a property schema defining you new property. This needs to be built and deployed.
Then you create a simple pipeline component. I would suggest using Martijn Hoogendoorn’s Pipeline Component Wizard that will create the shell project for your component.
You need a very simple pipeline component.
In the Execute method you can read the FILE.ReceivedFileName property from the context,
possibly parse the string removing the path info and promote the result into your property
[code:1:b98450480e]inputMessage.Context.Promote(<Your PropertyName>, <your property schema namespace>, <new value>);[/code:1:b98450480e]
There is no need to to read the data stream, the most complicated part of a pipeline component. The FILE properties are set by the adapter so you can position your component in any stage except the Disassemble stage and you do not have to worry about the completion of the stream read.
Once built you copy the resulting DLL to the [b:b98450480e]C:\\Program Files\\Microsoft Biztalk Server 2004\\Pipeline Components[/b:b98450480e] directory
To debug, you can attach to the BTSNTSrv.exe process setting appropriate breakpoints in VS2003
March 16, 2006 at 3:55 PM #13194
l am working on direct binding, type FILE.
l have 10 send ports, 1 send port group referencing those 10 send ports and 1 Receive Port.
In the send port group l added the filter Bts.ReceivePortName=myReceivePortName
but l also put filters in each send ports to distinguish the received files: File.ReceivedFileName=FileName1.xml
But this is not working. Is the File.ReceivedFileName working in filters?
March 17, 2006 at 11:22 AM #13195
I have been trying with and without the send port group.
I also set a filter to File.ReceivedFileName = \”myfile.xml\” and another one to File.ReceivedFileName = myfile.xml, not forgetting to set the Bts.ReceivedPortName.
l am still trying but if it doesn’t work l’ll just create as much receive ports l have send ports.
Thanks for the quick answer.
March 20, 2006 at 10:47 AM #13196
How can l write a pipeline that extracts the File. ReceivedName?
Thanks for your answers
March 27, 2006 at 9:19 AM #13197
The FILE.ReceivedName is using the full file path, for example \”c:\\test\\myfile.txt\”. That is probably why it doesn work. I have solved this problem myself by creating a string variable in my orchestration, add the FILE-ReceivedName to the variable and then call my own .NET.class-method to parse the real filename and then I add it to the message. This works great for me.
- The forum ‘BizTalk 2004 – BizTalk 2010’ is closed to new topics and replies.