Map<String, Object> externalMap = new HashMap<>();
externalMap.put("current.date",TalendDate.getCurrentDate());
Map<String, Object> executionProperties = exchange.getIn().getHeaders();
if (executionProperties==null){
executionProperties = new HashMap<>();
exchange.getIn().setHeaders(executionProperties);
}
executionProperties.put("org.talend.transform.externalmap", externalMap);
|