|
Home > Archive > BizTalk Server Orchestration > October 2004 > How to set messages name at Outgoing Ports URI?
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 |
How to set messages name at Outgoing Ports URI?
|
|
|
| Hi,
Currently , In my orchestrations port URI I am using
"....\%MessageID%.txt" name and it comes to really weird -
looking name, like:{A9EF1FB4-4A03-4970-A5FF-
17BFD9DE0E79}.txt
Is any way that I can use an original source file name,
because it also unique?
Also, How can I see original message in native format when
it is been processed by BT2004?
Thank you,
Alex.
| |
| Yossi Dahan 2004-07-28, 6:09 pm |
| Just use %SourceFileName% instead.
To see the message in the native format set the tracking to "before receive"
and than save the message through the HAT. it should appear in its native
format
Yossi
"Alex" <astar@NOSPAMsumitrans.com> wrote in message
news:5c6401c474b1$8ca8e990$a401280a@phx.gbl...
> Hi,
> Currently , In my orchestrations port URI I am using
> "....\%MessageID%.txt" name and it comes to really weird -
> looking name, like:{A9EF1FB4-4A03-4970-A5FF-
> 17BFD9DE0E79}.txt
> Is any way that I can use an original source file name,
> because it also unique?
>
> Also, How can I see original message in native format when
> it is been processed by BT2004?
>
> Thank you,
> Alex.
>
>
| |
|
|
|
| I got %SourceFileName%.txt as a result. It seems like
context property does not have a value, which is strange
becouse I use flat-file standatd adapter and original
file's name does not contain any problematic characters
and it is like
20040709NYE-20.txt
Any clue why SourceFileName macros is blank?
Alex.
| |
| Bill Chesnut 2004-07-29, 7:50 am |
| Alex,
You must set it in your orchestration,
outmessage(File.ReceiveFileName) = inmessage(File.ReceiveFileName)
in a message assignment shape, you could set it to anything this is just an
example of setting it to the same as the received file name.
Bill Chesnut
BizTalk MVP
"Alex" <anonymous@discussions.microsoft.com> wrote in message
news:5e4c01c474cf$66834df0$a301280a@phx.gbl...
> I got %SourceFileName%.txt as a result. It seems like
> context property does not have a value, which is strange
> becouse I use flat-file standatd adapter and original
> file's name does not contain any problematic characters
> and it is like
> 20040709NYE-20.txt
> Any clue why SourceFileName macros is blank?
>
> Alex.
>
| |
|
| Hello Bill,
Thank you for the tip.
My orchestration is really simple and it has this
structure:
Port_Incoming ->
-> Receive_Shape(Activate=True; Message=SUN_Instance)->
-> Constract_Shape(Message Constructed=SAP_Instance) +
Transform_Shape(Input Messages=SUN_Instance; Output
Messages=SAP_Instance) ->
-> Send_Shape (Message=SAP_Instance)->
-> Port_Outgoing
Now I have to include the message assignment shape, so I
can do it inside of my Constract_Shape but before
transform shape and my orchestration will looks like this:
Port_Incoming ->
-> Receive_Shape(Activate=True; Message=SUN_Instance)->
-> Constract_Shape(Message Constructed=SAP_Instance) +
+ Message_Assignment_Shape( expression:
SAP_Instance(Schemas.ReceiveFileName)=SUN_Instance
(Schemas.ReceiveFileName);) +
+ Transform_Shape(Input Messages=SUN_Instance; Output
Messages=SAP_Instance) ->
-> Send_Shape (Message=SAP_Instance)->
-> Port_Outgoing
However, for my "assigns shape" expression I got an error.
SAP_Instance(Schemas.ReceiveFileName)=SUN_Instance
(Schemas.ReceiveFileName); - "Identifier ReceiveFileName
does not exist in Schemas!"
Where "Schemas.SUN" and "Schemas.SAP" is a namespace for
my schemas and Schemas is a my schemas and map project's
name.
Do you know what am I missing?
Alex.
| |
| Bill Chesnut 2004-07-29, 8:46 pm |
| Alex,
it should be:
SAP_Instance(File.ReceiveFileName)=SUN_Instance(File.ReceiveFileName);
Bill Chesnut
BizTalk MVP
"Alex" <astar@NOSPAMsumitrans.com> wrote in message
news:6a1e01c4757e$220ea250$a501280a@phx.gbl...
> Hello Bill,
> Thank you for the tip.
> My orchestration is really simple and it has this
> structure:
>
> Port_Incoming ->
> -> Receive_Shape(Activate=True; Message=SUN_Instance)->
> -> Constract_Shape(Message Constructed=SAP_Instance) +
> Transform_Shape(Input Messages=SUN_Instance; Output
> Messages=SAP_Instance) ->
> -> Send_Shape (Message=SAP_Instance)->
> -> Port_Outgoing
>
> Now I have to include the message assignment shape, so I
> can do it inside of my Constract_Shape but before
> transform shape and my orchestration will looks like this:
>
> Port_Incoming ->
> -> Receive_Shape(Activate=True; Message=SUN_Instance)->
> -> Constract_Shape(Message Constructed=SAP_Instance) +
> + Message_Assignment_Shape( expression:
> SAP_Instance(Schemas.ReceiveFileName)=SUN_Instance
> (Schemas.ReceiveFileName);) +
> + Transform_Shape(Input Messages=SUN_Instance; Output
> Messages=SAP_Instance) ->
> -> Send_Shape (Message=SAP_Instance)->
> -> Port_Outgoing
>
>
> However, for my "assigns shape" expression I got an error.
> SAP_Instance(Schemas.ReceiveFileName)=SUN_Instance
> (Schemas.ReceiveFileName); - "Identifier ReceiveFileName
> does not exist in Schemas!"
>
> Where "Schemas.SUN" and "Schemas.SAP" is a namespace for
> my schemas and Schemas is a my schemas and map project's
> name.
>
> Do you know what am I missing?
>
> Alex.
>
>
| |
|
| Stupid me,
I just reasized,it should be in Upper case(FILE, not File).
SAP_Instance(FILE.ReceiveFileName)=SUN_Instance
(FILE.ReceiveFileName);
Alex.
| |
| Rohith 2004-08-11, 5:26 pm |
| I am also struck up with same problem!!
%SourceFileName% with FlatFile is not working..
I tried same way in Orchastration,
Message_2(FILE.ReceivedFileName)=Message_1(FILE.ReceivedFileName);
When i am compiling geting exceptions:
'Message_2': message has not been initialized in construct statement!!
use of unconstructed message 'Message_2'
I tried to Cinstruct New Message and problem is same..!!
Any Idea...why i am getting this error..after creating new msg!!
Is there any other way to solve this issue!!
CR-
quote: Originally posted by Alex
Stupid me,
I just reasized,it should be in Upper case(FILE, not File).
SAP_Instance(FILE.ReceiveFileName)=SUN_Instance
(FILE.ReceiveFileName);
Alex.
| |
| Neal Walters 2004-09-30, 10:40 am |
| I got your code to work when receiving a file and sending a file - BUT - what
if I want to create a file dynamically? The %SourceFileName% macro does not
substitute unless an actual physical file is received. So if I create a new
message by using XMLDOC.Load("<root></root>") etc... then try to write out
the file, the send port does not substitute a variable for %SourceFileName%.
I was looking into other macros such as %DestinationParty% - but haven't got
that to work yet either. I'm about to do some searches on "custom macros" to
see if they are available.
Thanks in advance,
Neal Walters
http://Biztalk-Training.com - Free Biztalk Training Videos
| |
| Neal Walters 2004-09-30, 10:40 am |
| Here's the quote from the help regarding %SourceFileName%:
Name of the file from where the File adapter read the message. The file name
includes the extension and excludes the file path, for example, Sample.xml.
When substituting this property, the File adapter extracts the file name from
the absolute file path stored in the FILE.ReceivedFileName context property.
If the context property does not have a value, for example, if a message was
received on an adapter other than the File adapter, the macro will not be
substituted and will remain in the file name as is (for example,
C:\Drop\%SourceFileName%).
Neal Walters
http://Biztalk-Training.com
| |
| Samuel Kastberg 2004-10-15, 9:09 pm |
| Hi Neal,
Did you solve this problem?
I did some research on my own and could use %DestinationParty%. What I did
was to create a new message just before saving and in the "Message
Assignment" used following code.
-----------------------------------------------------------------
NewMessage = MessageIncomming;
NewMessage(BTS.DestinationParty) = "SomeWildName";
-----------------------------------------------------------------
Configure the port with %DestinationParty%.
Samuel Kastberg
Callista Knowledgebase
"Neal Walters" <NealWalters@discussions.microsoft.com> wrote in message
news:D9DAA7A8-1298-4C10-9197-DDD0F32EE840@microsoft.com...
> I got your code to work when receiving a file and sending a file - BUT -
what
> if I want to create a file dynamically? The %SourceFileName% macro does
not
> substitute unless an actual physical file is received. So if I create a
new
> message by using XMLDOC.Load("<root></root>") etc... then try to write
out
> the file, the send port does not substitute a variable for
%SourceFileName%.
>
> I was looking into other macros such as %DestinationParty% - but haven't
got
> that to work yet either. I'm about to do some searches on "custom macros"
to
> see if they are available.
>
> Thanks in advance,
> Neal Walters
> http://Biztalk-Training.com - Free Biztalk Training Videos
>
| |
| Samuel Kastberg 2004-10-15, 9:09 pm |
| The same kind of logic lets you use %SourceFileName%. Just assign it a value
at message creation if possible or create a copy.
Samuel Kastberg
Callista Knowledgebase
"Samuel Kastberg" <sk-AT-callista.se> wrote in message
news:%23uVMmsqsEHA.2128@TK2MSFTNGP11.phx.gbl...
> Hi Neal,
>
> Did you solve this problem?
> I did some research on my own and could use %DestinationParty%. What I did
> was to create a new message just before saving and in the "Message
> Assignment" used following code.
> -----------------------------------------------------------------
> NewMessage = MessageIncomming;
> NewMessage(BTS.DestinationParty) = "SomeWildName";
> -----------------------------------------------------------------
>
> Configure the port with %DestinationParty%.
>
> Samuel Kastberg
> Callista Knowledgebase
>
>
>
>
> "Neal Walters" <NealWalters@discussions.microsoft.com> wrote in message
> news:D9DAA7A8-1298-4C10-9197-DDD0F32EE840@microsoft.com...
> what
> not
> new
> out
> %SourceFileName%.
> got
macros"[vbcol=seagreen]
> to
>
>
|
|
|
|
|