cancel
Showing results for 
Search instead for 
Did you mean: 

FileScenario

Former Member
0 Kudos

Dear Expertise,

I have the following scenario.

***************************************************************************************************

<u>Requirement</u>:- A set of files from source system are to be transferred to target system in sequential manner.

In source System we have set of files. Let us assume the filenames are as follows:

C:\POH12345.xml ( POH stands for Purchase Order Header file )

c:\POD12345.XML ( POD stands for Purchase Order Detailed file )

c:\POC12345.XML ( POC stands for Purchase Order Control file )

c:\POH78901.XML

c:\POD78901.XML

c:\POC78901.XML

c:\POH34567.XML

c:\POD34567.XML

c:\POC34567.XML

Now the scenario has to pick up a file name starts with POH* and process its corresponding files like POD and POC. Its corresponding files are identified with the suffix five digit characters 12345.

Say suppose, in the first iteration of POH* if the file C:\POH12345.xml is processed then its corresponding files POD12345.xml and POC12345.xml are picked and transfer to target system.

If files exists, then transfer the files to the target system in the below order:

c:\POC12345.XML

C:\POH12345.xml

c:\POD12345.XML

Summary:

In source system, the files are placed in this order:

C:\POH12345.xml

c:\POD12345.XML

c:\POC12345.XML

c:\POH78901.XML

c:\POD78901.XML

c:\POC78901.XML

c:\POH34567.XML

c:\POD34567.XML

c:\POC34567.XML

In target system the files should placed in this order:

c:\POC12345.XML

C:\POH12345.xml

c:\POD12345.XML

c:\POC78901.XML

c:\POH78901.XML

c:\POD78901.XML

c:\POC34567.XML

c:\POH34567.XML

c:\POD34567.XML

<u>Validation</u>:-

While processing the POH file, its corresponding POD and POC files are checked for existence. If the corresponding files are missing, we should do nothing.

******************************************************************************************************

Is this scenario possible in XI.

Please Help me out.

Thanks

Gujjeti

Accepted Solutions (0)

Answers (3)

Answers (3)

former_member181985
Active Contributor
0 Kudos

solved

Former Member
0 Kudos

HI,

As explained by above , you can use BPM , and check it for first message,and content of that message see it and accordingly use the PO nos for source files,

send once again for pick the file, with switch conditions for three types , if any one failed then handle this by exception handler all three and exception handler in a block , here the block should contain local correlation, and these all except first receive step repeat for the next records or do it once this instance will repeat for every message. and continue the IP design ....

i hope it is clear

Try with the Java proxies ..

Regards

Chilla

prasanthi_chavala
Active Contributor
0 Kudos

Hi Praveen,

Just try this:

In the advanced selection source files in the sender communication channel give the following parameters:

Directory File name mask

Source directory name *12345.xml

" *78901.xml

" *34567.xml

In the file access parameters give any dummy value.

The files will be processed according to the polling interval that will be given.

Let us know once u done with this.

Regards,

Prasanthi.

former_member181985
Active Contributor
0 Kudos

Thanks for your reply.

For understanding purpose only I have mentioned POH<b>12345</b>.

but that number is not fixed. We have to pickup POH* and its corresponding files POD* and POC* dynamically. The source system can contain 'n' number of POH files with different suffixes along POD and POC files with corresponding suffixes.

e.g., If the first time it picksup POH12345, we have to check for the existance of POD12345 and POC12345 files in source directory. If they exist we have to send them to target system in the following order

POC12345

POH12345

POD12345

Help me out.

Thanks

Gujjeti

prasanthi_chavala
Active Contributor
0 Kudos

Praveen,

Then i think u have to write adapter module code which will check the file names according to the requirement and do further processing in the sender side.I am not pretty sure abt it.

Lets see if any one post any solution.

Regards,

Prasanthi.

former_member181985
Active Contributor
0 Kudos

Yes prasanthi,

Lets see If some body can help me in this scenario.

Thanks

Gujjeti

bhavesh_kantilal
Active Contributor
0 Kudos

Praveen,

Use a BPM, with Correlation. That is the best way to implement this requirment.

Regards

Bhavesh

bhavesh_kantilal
Active Contributor
0 Kudos

Praveen,

What I mean here by using a BPM is, you get source file A inside the BPM and then wait for the source file B and c in the BPM with a deadline branch. The reason is ask you to do this, is that doing a direct IO operation to check for the existence of the file is something that is not recoemmended.

In your case, use a BPM get file A and then wait for the next files, ( yes, it is absolutely necessary that you need to have correaltion in this case between the various source files ). Only if there is correaltion will my interface work.

Regards

Bhavesh

Former Member
0 Kudos

Try this

When these files are created in a sequel manner, use a FILE NFS adapter.

Set the property “processing sequence” to by name

Rename the files on the source side before the processed by XI and target side after XI has processed the messages. To do this use your property command line.

The files:

POH12345.XML

POD12345.XML

POC12345.xml

Will be renamed to

POH12345.XML -> POB12345.XML

POD12345.XML -> POC12345.XML

POC12345.xml -> POA12345.xml

And will be processed by XI in the order

POC12345.xml -> POA12345.xml

POH12345.XML -> POB12345.XML

POD12345.XML -> POC12345.XML

Then rename the files back to original names, so rename

POA12345.xml -> POC12345.xml

POB12345.XML -> POH12345.XML

POC12345.XML -> POD12345.XML