cancel
Showing results for 
Search instead for 
Did you mean: 

Operating System Command After File Processing in Sender File Adapter

Former Member
0 Kudos

Hello guys,

actually we have different interfaces, and the client to take all the files from only one directory, for example D:/DPI.

Unitl now we had one adapter for every file with the content conversion, so we didn't have problems with that. Now we have the problem that we sould maintain an order processing files.

We thougth that an idea could be to execute one file pointing to D:/DPI and at the Operating System Command put like: copy D:/DPI/file.txt D:/DPI/outbound/file.txt, so when file is executed, we move the next file to another directory where is pointing the adapter. Doing this we have an error on the adapter giving us the message: Could not process due to error: java.lang.NullPointerException

We are using a Windows.

There is anyway to do in our way, or there is a better solution to resolve this problem?

Any other idea to do this?

Many thanks in advance.

Regards,

Xavi.

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Helo Guys,

maybe I haven't explained well.

We have one directory with different files. We have one adapter for every file( we need for the content conversion ) using NFS and all the adapters are pointing to the same directory.

The problem is that if we have files A.txt, B.txt and C.txt we need to process in an order.

And the problem we see is that for every file we have one adapter, so for example if we process file A.txt with one adapter, when this part is finished, we want to process file B.txt with another adapter, and the same for the rest of the files.

So the idea we had is to create another directories, and when A.txt has finished move file B.txt to another directory.

However this way is not running, if we log on the PI machine and execute cmd, we can do a copy of one file from one directory to another, but when we put this sentence in the adapter in OS command if we see the adapter log we see an error executing the OS command, but we don't know what is the error, there is no more information.

There is any way to do this or maybe we have to manage in a different way?

Many thanks in advance.

Regards,

Xavi.

Former Member
0 Kudos

It seems that you want to process file based their times stamp?

If yes, the NFS support that feature, but ftp does not.

If you use ftp, then you can ftp all the files into local NFS directory and process it again using NFS feature.

Regards

Liang

VijayKonam
Active Contributor
0 Kudos

I understand that you created a new file adapter to run the OS command. If so, whats happening is, the very file it needs to poll, it had already moved in to another folder and it could not find it any more.

I did not understand the requirement of order as the adapter would automatically process them in order you mention either alphabetically or by date.

VJ

Former Member
0 Kudos

For sender file adapter in the second Porcessing. There is an option called processing sequence.

You can put the value either by date or name.