Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
_AnonymousUser
Specialist III
Specialist III

Need help on tjavarow , tjava connection using runif

Hi,
I have a scenario in which after process some vale using tjavarow need to call some another function/code/component based on condition.
I am using run if , but failed to achieve it.

Regards,
Anup
Labels (3)
8 Replies
Anonymous
Not applicable

Hi
Some screenshots of job will be helpful for us understanding your problem well.
Best regards
Shong
Anonymous
Not applicable

please check the sample image.
Anonymous
Not applicable

Hi
What's the condition expression you set now? Please describe more information what you want to do.
Best regards
Shong
Anonymous
Not applicable

My Table contain application_id. Based on that it I want to use some componet. The component may be tJava / tJavarow / tRunJob
Anonymous
Not applicable

Hi,
What don't you just put your condition in your tJava row???
If(){
....
} else if (){
}
...
Anonymous
Not applicable

You can use a context var inside your tjavarow like this :
context.myvar = input_row. (in your case : application.id if I understand)

On your "if" link you can use the context var to test your choice :
"myapplication1".equals(context.myvar)
Anonymous
Not applicable

Thanx for the suggestion .
I have try out .. its working ..but facing new problem .
i have connect tJavarow with tjava using if .
It give result for last record only
Anonymous
Not applicable

Hi
The runif trigger is fired after the tJavaRow works, that's why you only get the last record. In this case, you need to iterate each row, for example:
....tMap--out1---tFlowToiteate--iterate---tFixedFlowInput--main--tJavaRow---runIf---tJava_2
on tFixedFlowInput, generate each row of out1, for example, add two columns on the schema:
key:value
id 0683p000009MPcz.pngInteger)globalMap.get("out1.id") //assuming the data type of id column is integer/int type.
name 0683p000009MPcz.pngString)globalMap.get("out1.name") //assuming the data type of name column is String type.
on tJavaRow: do as Xavier MOUCHOT mentioned.
Best regards
Shong