cancel
Showing results for 
Search instead for 
Did you mean: 

2 file to file scenarios and one sender channel

Former Member
0 Kudos

hello there,

i am implementing 2 file to file scenarios. referring to the below link i have 'by-pass' integration repository in order to perform my file to file transfer since both the input and output files have the same structure, hence no mapping is required.

http://www.sdn.sap.com/irj/scn/weblogs;jsessionid=%28J2EE3417500%29ID0036662950DB01052533299951691312End?blog=/pub/wlg/4383 --> How to send any data (even binary) through XI, without using the Integration Repository

as seen in the link provided above, it is mentioned to provide a 'dummy' interface and namespace as no such things were created in the IR.

Now i have a second development which perform the same task(file 2 file) however the naming and source/target directory for the second one differs fromt eh first.

that is for the first one the source directory is srcroot/folder1/ and for the secon one is srcroot/folder2

the target for the first scenario is trtroot/folder1 and second is trtroot/folder2.

i wanted to use the same sender channel, making use of the advanced features to pick the files from the different directories, however the scenario always put my files, even those from srcroot/folder2, in the first target folder that is in trtroot/folder1 instead of trtroot/folder2.

one easy way of doing this, is to create channels for each scenario, but if possible i want to use one sender channels for both, is that possible for my scenarios?

can anyone please advise me?

if there is a better way, you are welcome to share it with me.

thank in advance.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Use advanced selection for picking up the files from different directories.

Also for sender channel select the Adapter specific message attributes for Filename or Directory

Since this is a scenario where there is no IR part involved create two receiver Services with communication channels.

In receiver determination add the two receiver services and check the condition using File directory or FileName in the context objects for the respective service.

Eg: if one of the source directory is srcroot/folder1/ then in the condition check whether the File directory is equal to srcroot/folder1/,if yes it will go to the receiver service.

Thanks,

Ramkiran

Former Member
0 Kudos

Hi Ramkiran,

When you said to create 2 receiver services with communication channels, you meant to include the same sender and receiver channel in both services, rite?

thanks,

Ali.

Former Member
0 Kudos

Hi Ali,

You can use the same service for sender chaneel and one of the receiver channel or you can create different services.

i.e can be in 2 ways

Different services for all the channels or you can use the same service for sender channel and one of the receiver channel and different service for other receiver channel.

Thanks,

Ramkiran

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi,

You can pick the data using same sender channel.

But there are two ways of putting the files to their corresponding destinatios:

1)Using 'Adapter Specific Message Attribute' in communication channel.

But for this to work you have write UDF in your mapping, but as you are not using IR part, this approach can't be used.

2) Another way is, you can use variable substitution method, where the values of the target directory is populated by payload of the incoming file.

If this is not possible, then there is no way but to define 2 diffrent communication channels for receiver.

-Supriya.

Former Member
0 Kudos

@supriya ,

1)Using 'Adapter Specific Message Attribute' in communication channel.

But for this to work you have write UDF in your mapping, but as you are not using IR part, this approach can't be used.

2) Another way is, you can use variable substitution method, where the values of the target directory is populated by payload of the incoming file.

-


> Here Interfaces are dummy and mappings are also dummy which are used at Config level . So i don't think we can use variable substitution ..etc

Regards ,

former_member200962
Active Contributor
0 Kudos
making use of the advanced features to pick the files from the different directories, however the scenario always put my 
files, even those from srcroot/folder2, in the first target folder that is in trtroot/folder1 instead of trtroot/folder2.

Receiver File CC needs to be maintained separately.....one CC cannot put files in both the locations

I have a doubt if common sender channel will work....file(s) will be picked....but then while posting i am not sure how/ where it will post the file (assuming that other ID objects are reused).

Regards,

Abhishek.

Former Member
0 Kudos

Thanks for replying abhishek,

definitely i wil be using a different receiver channel; i am just investigating if i can the same sender channel for multiple receiver channels found in different scenarios.

i think the problem is because there is no really an interface as such since am providing a dummy one.

any ideas are welcome.

Former Member
0 Kudos

Click_17 ,

Definately you can pick the file from n differnet locations using teh same CC. becoz in this case CC is just behaving as a plain file mover and it has to just pick the files that's it .

but at the time of posting the file(in case of same receiver channel ) there will be a catch : how XI will come to know where to post which file out of n diiferen tfiles passed by sender CC ?

So not possible from my view point .

Regards ,

Former Member
0 Kudos

Hi Guys,

How do we pick the files from different folders with different filenames (assuming) using same CC ..

is this possible ..if yes then how...

later it has to be passed to the receivers based on the either different channels or based on Dynamic Configuration which requires the mapping part...

But what he is asking is how to pick the files using single sender channels..i am also eager to know if this is feasible..

Rajesh

Former Member
0 Kudos

@Rajesh ,

Regards ,