This recipe covers an important aspect related to getting the return code that was obtained from the execution of our jobs. It gives you some advice on how to get it so that it could be used to determine if everything is going as expected. This recipe will work the same for both Kitchen and Pan; the only difference is in the name of the script's file used to start the process.
To get ready for this recipe, you need to check that the JAVA_HOME
environment variable is set properly and then configure your environment variables so that the Kitchen script can start from anywhere without specifying the complete path to your PDI home directory. For details about these checks, refer to the recipe Executing PDI jobs from a filesystem (Simple).
kitchen.sh
script and add the following command at the end of the PDI script. This command returns the exit code of the last called process:exit?1
Kitchen.bat
script and add the following command at the end of the PDI script. This command returns the exit code of the last called process:echo %ERRORLEVEL%
It will be interesting to have a look at the summary of all the exit codes.
The following table summarizes all the exit codes with a brief explanation of their meanings:
Code |
Description |
---|---|
|
The job/transformation ran without a problem. |
|
An error occurred during processing. |
|
An unexpected error occurred during loading/running of the job/transformation. Basically, it can be an error in the XML format, an error in reading the file, or it can denote that there are problems with the repository connection. |
|
Unable to connect to a database, open a file, or other initialization errors. |
|
The job/transformation couldn't be loaded from XML or the repository; basically, it could be that one of the plugins in the |
|
An error occurred while loading steps or plugins (an error in loading one of the plugins mostly). |
|
Command line usage printing. |