Skip to main content Skip to complementary content

Defining the properties of the first tJava component (OnSubjobError)

Procedure

  1. Select the first tJava component to define its properties. This component displays information in the console when the Job contains an error.
  2. Add the following code in the Code section.System.out.println("tJava_1: Subjob ERROR"); org.talend.transform.runtime.api.ExecutionStatus es = (org.talend.transform.runtime.api.ExecutionStatus)globalMap.get("tHMap_1_EXECUTION_STATUS"); System.out.println("Execution result:" + es.getOverallSeverity()); // ExecutionStatus object System.out.println(es.toString()); // XML version of ExecutionStatus object java.io.StringWriter sw = new java.io.StringWriter(); es.exportToXml(sw); System.out.println("ExecutionStatus as XML"); System.out.println(sw.toString());

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – please let us know!