Defining the properties of the second tJava component (OnSubjobOk) - Cloud - 8.0

Data mapping

Version
Cloud
8.0
Language
English
Product
Talend Big Data Platform
Talend Data Fabric
Talend Data Management Platform
Talend Data Services Platform
Talend MDM Platform
Talend Real-Time Big Data Platform
Module
Talend Studio
Content
Data Governance > Third-party systems > Processing components (Integration) > Data mapping
Data Quality and Preparation > Third-party systems > Processing components (Integration) > Data mapping
Design and Development > Third-party systems > Processing components (Integration) > Data mapping
Last publication date
2024-02-29

Procedure

  1. Select the second tJava component to define its properties. This component displays information in the console when the Job runs successfully.
  2. 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());