Defining the properties of the third tJava component (RunIf) - 7.0
Data mapping
- EnrichVersion
- 7.0
- EnrichProdName
- Talend Big Data Platform
- Talend Data Fabric
- Talend Data Management Platform
- Talend Data Services Platform
- Talend MDM Platform
- Talend Real-Time Big Data Platform
- EnrichPlatform
- Talend Studio
- task
- 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
Procedure
-
Select the third tJava component to define
its properties. This component runs if any errors occur within the map itself
(higher than informational status).
-
Add the following code in the Code
section.
System.out.println("tJava_3: Run If");
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());