You are not logged in.
Announcement
Unanswered posts
|
Pages: 1

Hi,
I have the folowing scenario(image attached).
Can I use a "Run if" when the output is, like in the image, "0 rows"? If not, what is the best way to call another component when a result of a flow is zero rows?
Thanks,
Vitorr
Last edited by vitor_lopes (2010-04-21 16:18:12)
Offline
Hello
Using the global variable: ((Integer)globalMap.get("tFileOutputExcel_1_NB_LINE")), for exmaple:
tFileInputDelimted---tFileOutputExcel_1
|
onsubjobok
|
tJava
|
runIf---trigger other components.
on tJava:
int nb=((Integer)globalMap.get("tFileOutputExcel_1_NB_LINE"));
if(nb==0){
globalMap.put("key",true);
}else{
globalMap.put("key",false);
}
set the condition of runIf as:
(boolean)globalMap.get("key")
Best regards
Shong
Offline

Hi Shong,
I have done it, however I keep on getting this error:
Error in the component's properties:Cannot cast from Object to boolean
Been trying to solve it but no success.
Thanks,
Vitor
Offline
Hello
Sorry, the condition of RunIf should be:
(Boolean)globalMap.get("key")Best regards
Shong
Offline

Arrgh.. also missed that, that's what you get for programming in 3 different languages a day.
Many thanks,
Vitor Lopes
Offline
Pages: 1