I use tRest to call web,and return data, tRest returns schema include Body and ERROR_CODE, if ERROR_CODE if null,means the call is OK. So I use run if trigger to connect tRest and tjava, condition is : tRest.ERROR_CODE!=null . Talend return error:tRest cannot be resolved to a variable. So how do i write this condition? I am a bit confused with the way to get value in talend, and can't find it in the document.
Hi
Link tRest to a tJavaRow and check the if ERROR_CODE is null there, eg:
tRest--main--tJavaRow--runIf--tJava
on tJavaRow:
if(input_row.ERROR_CODE!=null){
globalMap.put("hasError", true);
}else{
globalMap.put("hasError", false);
}
Set the condition as:
(Boolean)globalMap.get("hasError")