[resolved] tSendMail will send twice the same mail

Highlighted
One Star

[resolved] tSendMail will send twice the same mail

Hi
See my job in attached picture.
If I don't like the tFlowMeterCatcher to tSendMail, only one email will be send.
But when both are linked like here, I receive the same email twice.
I don't see why.
Thanks a lot and have a nice day

Accepted Solutions
Four Stars

Re: [resolved] tSendMail will send twice the same mail

Not required in the way you think... talend does not understand top or bottom or direction or location of the component or subjob...
He may execute it in different way... try using three independent tJava components printing system.out.println statements and test...you will get an idea...
if you need ordered execution, then tPreJob and tPostJob and independent job will work as required in the form of order... check this also...
Vaibhav

View solution in original post


All Replies
Highlighted
Four Stars

Re: [resolved] tSendMail will send twice the same mail

Hi,
- Remove existing OnSubJobOk link from tFlowMeterCatcher
- Use OnSubJobOk link from your tfileInputDelimited to your SendMail component... and change the order of this link to 2
Thanks
Vaibhav
Highlighted
Moderator

Re: [resolved] tSendMail will send twice the same mail

Hi,
Please take a look at component reference with related scenario TalendHelpCenter:tFlowMeterCatcher.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Highlighted
One Star

Re: [resolved] tSendMail will send twice the same mail

Hi Sabrina and Vaibhav,
Thanks a lot for your answers.
Sorry because I am not sure to get it...
First think is I understand tFlowMeterCatcher shouldn't be on the same job then tFlowMeter.
In the component help it is said in USAGE section : "This component is the start component of a secondary Job which triggers automatically at the end of the main Job."
On the other hand, like you will see on the two pictures, whith the job designed like that, everything works well.
It's only when I link tFileList_2 with tSendMail_1 with a OnsebJobOK link that the email is send twice.
I must be missing something...
Vaibhav, when you say "change the order of the link to 2", what do you mean ?
Sorry for these questions but I just dived into Talend and I may have missed one or two things !
Thanks and have a good day.
Highlighted
Four Stars

Re: [resolved] tSendMail will send twice the same mail

Vaibhav, when you say "change the order of the link to 2", what do you mean ?
>> Click on the connector and select option ModifySubjobOk link order
Everything is fine and fair if your requirement is satisfied with whatever design you imagine...
Vaibhav
Highlighted
One Star

Re: [resolved] tSendMail will send twice the same mail

Thank you very much.
Seems I don'"t have this option.
Tried to right click the connector and click on properties but nothing happens...
Yes it works. I just want to understand why there would be two email if I link tSendMail at the end...
It looks like a loop (2 iterations) but I don't see where it could be.
Frank
Highlighted
Four Stars

Re: [resolved] tSendMail will send twice the same mail

Tried to right click the connector and click on properties but nothing happens...
>> This option is available only when you have more than one connector originating from the component or subjob
Thanks
vaibhav
Highlighted
One Star

Re: [resolved] tSendMail will send twice the same mail

Got it !
One last things, if a component unlinked is at the end of the design ; does it means it will be processed at the end, and only when the whole "first linked jobs" will be dealt ?
Thanks
Four Stars

Re: [resolved] tSendMail will send twice the same mail

Not required in the way you think... talend does not understand top or bottom or direction or location of the component or subjob...
He may execute it in different way... try using three independent tJava components printing system.out.println statements and test...you will get an idea...
if you need ordered execution, then tPreJob and tPostJob and independent job will work as required in the form of order... check this also...
Vaibhav

View solution in original post

Highlighted
One Star

Re: [resolved] tSendMail will send twice the same mail

Understood.
Thanks a lot
Highlighted
Moderator

Re: [resolved] tSendMail will send twice the same mail

Hi fbonnot,
Is you issue fixed? If so, please mark this topic as resolved.
Best regards
Sabrina
--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Highlighted
One Star

Re: [resolved] tSendMail will send twice the same mail

Ooops...

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog