cancel
Showing results for 
Search instead for 
Did you mean: 

multiple sender one receiver

Former Member
0 Kudos

Hi Experts,

I have a scenario where i have two senders and one receiver.My requirement is to change the file name when i place it in target.

Say

i have file name Jan_Target1(month is changing) in source 1.

and Jan_Target2(month is changing) in source 2. both file at different locations.

For source i have created two channels and i am picking it using *.txt.

in target i need to ignore the month and place the files as Target1.txt and Target2.txt

i created a mappping and i am trying to use a UDF to get and overwrite the file name using dynamic configuration.

I have cheked the File name in adapter specific msg attribute in both sender and reciver side.

But the same source file name is coming at target The udf is not getting executed to overwrite the file name.

But it is not working out :(.

The input file is not having any DT created, its just pick and place scenario as the structure for it is not defined.

Request experts to let me know how to overwite the file name.

Thanks ,

Anika

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

I doubt whether your method works because according to my assumption the value which you dynamically sent through the UDF for output file name might have overwritten by the file name which receiver channel picks by adapter attributes ie ( since adapter sttrbutes are checked both in sender as well as receiver u get the file name which is same as input file name).

Former Member
0 Kudos

hi siva,

Thanks for your reply

i tried without selecting the filename in the adapter specific msg attribute for receiver.To my knowledge it is essential to check filename attribute for sender adapter otherwise the dynamic configuration for geting file name will not work.

i am not getting the filename in the pay load.

is there any other way to get a part of file name( substring of file name) and based on that can we name the file for the target.Eg if input files are A_123.txt and B_345.txt ,the target shd contain 123.txt and 345.txt.

Regards,

Anika

Former Member
0 Kudos

Hello,

You need to extend your scenario in such a way that UDF gets executed.

according to you there is no DT types then is there mapping program ? I scared where you are executing the UDF as UDF will executed during the mapping execution only,so In order to execute UDF mapping program should be available.

Create Mapping program MM and just select pattern button for mapping same source data to target data and put UDF at some part.(I hope you are doing this)

Rajesh

Answers (2)

Answers (2)

Former Member
0 Kudos

The input file is not having any DT created, its just pick and place scenario as the structure for it is not defined.

If you are doing a bypass scenario(no DT/MT created) then message mapping will not be executed,since this type of scenario wont check the sender payload against the sender Data data type.

Do all the configurations in integration repository(Data type,Message type,MI,MM and IM) and then execute your scenario and it should work.

If the sender payload you are getting is not well formed,then you need to use Java mapping to get dynamic configuration values(graphical mapping requires sender payload to be well formed).

Thanx

Aamir

prateek
Active Contributor
0 Kudos

Many doubts

1. Are you using BPM to merge two files into one? Or these are two separate scenarios?

2. Without DT, how are you using UDF?

If BPM is used, then unfortunately dynamic configuration values are lost in the transformation step.

Regards,

Prateek