• Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » [resolved] Best way of: if(x=y) THEN runJob1 ELSE runJob2

#1 2012-06-27 16:37:54

outlaw77
Member
Registered: 2011-06-03
Posts: 39

[resolved] Best way of: if(x=y) THEN runJob1 ELSE runJob2

Tags: [development, java]

Hello,
I thinking about a solution for the following scenario:


Creating XML document and transport them to a different place - via FTP, Email, or other service.

Creating XML document is already a defined job.
The kind of transport is defined in my context.Vars() (1=FTP, 2=Email etc.)

What kind of component can I use to switch to the following job (postJob), which get my created file and takes it somewhere.

Thank you very much!
regards,
Robert

Offline

#2 2012-06-28 04:33:29

shong
Talend team
Registered: 2007-08-29
Posts: 10357
Website

Re: [resolved] Best way of: if(x=y) THEN runJob1 ELSE runJob2

Hi Robert
You can use runIf connector to fires different child jobs, for example:
....another subjob---runIf_1--tRunJob_1
                            ---runIf_2---tRunJob_2

the condition of runIf connector is a boolean expression, for example, the expression of runIf_1 is set as:
"x".equals("y")

Best regards
Shong


Email:shong@talend.com
Choose Talend, Enjoy Talend!
New & Event: Talend Help Center
Talend-->the leader of open source data management and application integration solutions!

Offline

#3 2012-06-28 08:54:35

outlaw77
Member
Registered: 2011-06-03
Posts: 39

Re: [resolved] Best way of: if(x=y) THEN runJob1 ELSE runJob2

Thank you Shong!
That was exactly I was looking for!
regards,
Robert

Offline

  • Index
  •  » Talend Open Studio for Data Integration » Usage, Operation
  •  » [resolved] Best way of: if(x=y) THEN runJob1 ELSE runJob2

Board footer

Powered by FluxBB