简体   繁体   English

从pentaho Kettle到Java的自定义错误代码

[英]Customized Error code to Java from pentaho Kettle

Is it possible to throw some customized error code to java from kettle. 是否可以从水壶中向Java抛出一些自定义的错误代码。

Design: 设计:

KJB is invoking from java appliaction. KJB正在从Java应用程序调用。

with the help of the below code we are deciding the job got success or failure. 在下面的代码的帮助下,我们确定工作是成功还是失败。

if(job.getErrors() < 1) { result=XXX; if(job.getErrors()<1){结果= XXX;

     } 

I supposed to throw some error code like '30' for filename missing ,'45' for input param missing' etc. 我应该抛出一些错误代码,例如缺少文件名的“ 30”,缺少输入参数的“ 45”等。

How to pass this code to java application from KJB. 如何从KJB将此代码传递给Java应用程序。

Thanks in advance. 提前致谢。

As quick workaround, solution is not perfect. 作为快速的解决方法,解决方案并不完美。 Add to job file existence and validation steps, log those errors and traverse logs after. 添加到作业文件的存在和验证步骤,记录这些错误,然后遍历日志。

https://help.pentaho.com/Documentation/8.1/Developer_Center/PDI/Embed#Obtain_Logging_Information https://help.pentaho.com/Documentation/8.1/Developer_Center/PDI/Embed#Obtain_Logging_Information

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM