New archived content: Talend MDM, Talend Data Catalog 8.0, and Talend 7.3 products reached their end of life in 2024. Their documentation was moved to the Talend Archive page and will no longer receive content updates.
Defining the properties of the second tJava component (OnSubjobOk)
Procedure
Select the second tJava component to define
its properties. This component displays information in the console when the Job
runs successfully.
Add the following code in the Code section.
System.out.println("tJava_2: Subjob OK");
org.talend.transform.runtime.common.MapExecutionStatus status = ((org.talend.transform.runtime.common.MapExecutionStatus) globalMap.get("tHMap_1_EXECUTION_STATUS"));
System.out.println("Execution result:" + status.getOverallSeverity());
System.out.println(status.toString());
// XML version of the Execution Status
java.io.StringWriter sw = new java.io.StringWriter();
status.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!