Trigger Success mail only when 3 Child Jobs completes

Highlighted
Eight Stars

Trigger Success mail only when 3 Child Jobs completes

Hi All,

 

Hope everyone is doing fine here with Talend Learning Smiley Happy

 

I have a scenario where I have to trigger my SuccessMail only when 3 of the Child Jobs will be completed. Now after tparallelize------------>(Parallel) 3 Child Jobs Connected--------->Synchronize(SuccessMail). problem is once each job is getting completed SuccessMail is triggering. And I want all 3 to be completed and then only Successmail should trigger. I have tried taking it in tPostJob but there problem is if any of those 3 Job fails still in postjob SuccessMail is triggering. Can anyone please help on how to handle this scenario.

 

@rhall_2_0@TRF@vapukov@vboppudi@manodwhb 


Accepted Solutions
Employee

Re: Trigger Success mail only when 3 Child Jobs completes

Hi,

 

     You are currently adding the subjobs before tparallelize component. This is the reason why three OnSubjobOK are present before your tparallelize component and are executing before paralelize component. If you observe my previous post, I have created parallel operations for child jobs after tparallelize component.

 

      If you are connecting a job correctly, the link will be in blue with word "Parallelize" present above the link.

 

      I would suggest to try the below scenario specified in help document to understand the functionalities of tparallelize before applying it to your scenario.

 

https://help.talend.com/reader/g8zdjVE7fWNUh3u4ztO6Dw/x6H8ibjgBJw3oAsRXeYk4g

 

Warm Regards,

 

Nikhil Thampi

 

 

View solution in original post


All Replies
Community Manager

Re: Trigger Success mail only when 3 Child Jobs completes

Can you show us a screenshot of your job?

Employee

Re: Trigger Success mail only when 3 Child Jobs completes

Hi,

 

    I have created a skeleton diagram for your flow. Could you please check whether below flow is working in your case?

 

    image.png

 

 

Warm Regards,

 

Nikhil Thampi

Eight Stars

Re: Trigger Success mail only when 3 Child Jobs completes

Hi @nikhilthampi, @rhall_2_0,

 

Thanks for your suggestion. I am yet to try your suggestion. But I think this will handle the failure case scenario.But can u tell me how to handle on whether how to run my filearchive Job only once after 3 jobs will complete. Smiley Happy Synchronize.jpgSuccessCase Scenario?As after all 3 Completition My Archival Job will run.

 

 

Employee

Re: Trigger Success mail only when 3 Child Jobs completes

Hi,

 

     If the archive job is waiting for files from all three jobs, then you should add it to the synchronize flow. You can add a On Subjob Ok to mail component and archive the data.

 

Warm Regards,

 

Nikhil Thampi

Eight Stars

Re: Trigger Success mail only when 3 Child Jobs completes

Hi @nikhilthampi,

No My Filearchive Job is not waiting for any of those 3. Yes FileArchive Job is in Synchronize(wait for All) Flow from tparallelize. But problem happening is Archival is happening 3 times.

Employee

Re: Trigger Success mail only when 3 Child Jobs completes

Hi,

 

    Could you please add a diagram where you have added the archive component? It will provide detailed insight about the issue. It seems the three jobs are present before tparallelize.

 

Warm Regards,

 

Nikhil Thampi

Eight Stars

Re: Trigger Success mail only when 3 Child Jobs completes

Hi @nikhilthampi, @rhall_2_0,

Please find the Drawing where I explained the scenario what I am trying to achieve.yes 3 Jobs are in parallel link with tparallelize. Also One thing archival have no dependency for file on Job1,Job2 and Job3

tparallelize_Scenario.jpg

Employee

Re: Trigger Success mail only when 3 Child Jobs completes

Hi,

 

     You are currently adding the subjobs before tparallelize component. This is the reason why three OnSubjobOK are present before your tparallelize component and are executing before paralelize component. If you observe my previous post, I have created parallel operations for child jobs after tparallelize component.

 

      If you are connecting a job correctly, the link will be in blue with word "Parallelize" present above the link.

 

      I would suggest to try the below scenario specified in help document to understand the functionalities of tparallelize before applying it to your scenario.

 

https://help.talend.com/reader/g8zdjVE7fWNUh3u4ztO6Dw/x6H8ibjgBJw3oAsRXeYk4g

 

Warm Regards,

 

Nikhil Thampi

 

 

View solution in original post

Eight Stars

Re: Trigger Success mail only when 3 Child Jobs completes

Hi @nikhilthampi,

Yes that what problem lies. I removed those ONSUBJOBOK and added My Archival Job after previous tparallelize Component in Synchronize Flow(I missed that Screenshot).Marking your answer as Solution Smiley Happy

2019 GARNER 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

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch 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