cancel
Showing results for 
Search instead for 
Did you mean: 

Variable Substitution

Former Member
0 Kudos

Hi,

In my scenario i have one source message and two target messages.I am using multi mesaage mapping. Now i must generate filenames dynamically. One filename for one message and another filename for other message.The filename will be generated depending on a field in the payload.I cannot use dynamic file configuration because the file name gets overwritten.How can we use variable sustitution for two different messages

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

I forgot to specify, iam using one reciever service and only one reciever channel for both the messages.

nisarkhan_n
Active Contributor
0 Kudos

So u have single receiver, single filea adapter and enhanced interface determination?

Since you are determing the message 1 or message 2 should be the target in the runtime, you cannot have the single file apater which has the message1 & message 2 field in it for variable substution..........

what i suggest is

sol1:

just add the one more interface determination, do two mapping programs for this one for source to message 1 and source to messag2, now create the 2 file adatpters and goforward for your requiremtn, in the interface determination step write the conditino which you are using in the multi mapping for each of the interface determination......

sol2:

is the message1 and message 2 strucutre is same then add a common field name like fieldname and use this in variabel subtion and delete this field later from payload, in this way you can achive this using the single file adatper....

/people/sravya.talanki2/blog/2005/08/11/solution-to-the-problem-encountered-using-variable-substitution-with-xi-sp12

to delete the field name from payload whch you have added in the target..

Add a field in the target strucutre of the message1 and message2

nisarkhan_n
Active Contributor
0 Kudos

variable substution is possible for 2 messages.

Follow the normal method for the variable substuition in each of the file adapter, in your case if you have 2 messages and if you are delivering the two messges using 2 file adapters then follow the simple steps of variable substution and point the each field in each adapter.

it will be easy to get more accurate answers if you can describe your ID, are you using the 1 receiver or two?

Former Member
0 Kudos

Hi,

Refer these links for dynamic file naming:

/people/michal.krawczyk2/blog/2006/02/23/xi-dynamic-name-in-the-mail-attachment--pseudo-variable-substitution

/people/jayakrishnan.nair/blog/2005/06/20/dynamic-file-name-using-xi-30-sp12-part--i

/people/jayakrishnan.nair/blog/2005/06/28/dynamic-file-namexslt-mapping-with-java-enhancement-using-xi-30-sp12-part-ii

Regards,

Nithiyanandam