cancel
Showing results for 
Search instead for 
Did you mean: 

Queiry Regarding File adapter

Former Member
0 Kudos

Hi Frns,

I have six file adapters having different naming of the files to process..

but the 3rd party is not placing the files in stndard format.So the user has asked us to find an alternative.So we wrote a script to change the file names into out standard format.

but i have a quiery here if we keep the script in command line before message processing.

As i have six adapters if the wrong communicaiton channel has changed the name of the file,but the name is not what is required by that adapter .Will the Channel through an error??

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Few basic questions:

1. There are only 6 file names (set of file name) send by 3rd party system, and the correct naming criterion is given in your 6 CC's ?

(In this case the files will only be picked by the respective CC..so no question of error or wrong CC picking the file)

2. Why do you have 6 CC ?

Former Member
0 Kudos

Hi Prabhas,

You can keep the file naming convension as *.xml.

1. Why are you trying to create 6 different communication channels?

2. Do the structure of the files are different?

Thanks,

Former Member
0 Kudos

Hi hareen,

yeah the structures are different ....

.xml will it work out.. coz depending on the name of the file i have to send it different mappings and receivers..

Former Member
0 Kudos

As the structures are different *.xml will not work.

It is better you need to have a unique identification for the filename.

Eg: If the file name is XI123.xml and if the the number in the filename changes then we can keep it as XI*.xml.

Else another option is keep individual folders for the Communication channels even the naming is different we can keep it as *.xml.

I hope this helps you...

Thanks,

Former Member
0 Kudos

Thanks hareen for the suggestion..

but my doubt was lets say channel 1 process files with name 1.xml and channel 2 process file with name 2.xml..

i have a script to change the name of file to 1.xml or 2.xml..and added in run os command

when a file is placed in folder lets say channel 1 is polling the directory and renamed the file to 2.xml using the script..But it has to process files with name 1.xml only..What will the adapter do now through an error Or channel 2 picks it up?

Former Member
0 Kudos

You would be keeping the naming convension in the file adapter right? So Adapter will not pick the files with other naming convension.

Thanks,

Former Member
0 Kudos

> but my doubt was lets say channel 1 process files with name 1.xml and channel 2 process file with name 2.xml..

>

> i have a script to change the name of file to 1.xml or 2.xml..and added in run os command

>

> when a file is placed in folder lets say channel 1 is polling the directory and renamed the file to 2.xml using the script..But it has to process files with name 1.xml only..What will the adapter do now through an error Or channel 2 picks it up?

The answer to your above mentioned question is, "Yes, the channel will throw error."

This is not a good solution because let's assume all 6 CC starts poling one by one and first CC renames it as per your standard and but it founds that the file format is not correct it will go into error, similarly this can happen to all CC's till it get converted by the correct CC. Hence at a time you may get 5 CC's into error. Not sure but there could be some dead-lock situation as well if any of 2 or more CC starts renaming the same file at the same time.

You need to find a better solution, may be after discussing with customer, otherwise the solution will work as explained above.