cancel
Showing results for 
Search instead for 
Did you mean: 

Return Code after Command Line (File Adapter)

Former Member
0 Kudos

Hello all,

i execute in the File Receiver Channel a Shell Script.

Now i need a solution, when an error happens. The script returns an error code and i want that the Adapter Monitor is showing this information/error.

How can i enable this?

Or is there an other possibility to monitor this??

many thanks for your help

ilka

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi

Check this blog,

/people/michal.krawczyk2/blog/2005/08/17/xi-operation-system-command--error-catching

cheers

Sameer

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi IIka,

I have not tried this but I think

The return code of the script cannot be shown in monitor, because the call ends (does not expect a response) once the file adapter is called.

May be you can capture the errors in a seperate file and

use that as a log.

I am not sure if there is anyother way

also check this blog /people/michal.krawczyk2/blog/2005/08/17/xi-operation-system-command--error-catching

Regards

Vishnu

Former Member
0 Kudos

Ilka,

It appears that you need the Shell Script to return an acknowledgement to the Integration Server. I think that is not possible, because I believe that executing the Shell Script is not synchronous from XI.

One solution is to have the scenario as a BPM. One process of it will be the Receiver Adapter that executes the Shell Script. In this, create a NEW subdirectory <DIR_LOG>, and write out a log file in this, only if no error occurs. Other process can be the another Receiver that attempts to write to this new subdirectory.

If an error occurs in the script, there will be no new <DIR_LOG> subdirectory and the BPM fails.

In essence, the XI will have an error status for the BPM instead of a simple scenario.

Hope this helps,

Bhanu