Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a need to trigger a child job asynchronously and parent job to exit once the child job is triggered.
How can I achieve this? May be it can be done through tjava component, but could you let me know how can I pass the context parameters to the child job?
Thanks in advance.
@lakshmiy, could you please post your job design?
Hi,
Please find the parent and child job screenshot in the attachment.
I have a master job which has a tloop and trunjob (say trunjob_1) component.
I have a child job which reads SQS queue, extracts json and then run another subjob (say trunjob_2).
I have a requirement that the child job trunjob_2 to asynchronously run and proceed with the next iteration rather than waiting for trunjob_2 to finish.
Please let me know if you need more information.
Thanks,
Lakshmi
@lakshmiy,If I understand correctly you are passing some variable which you have read from SQS to tRunjob2. since when you have dependdency that for each iteration you need to take that value and need to execute tRunjob2 right? i do not that think that with out completing the iteration how you will startthe second one.
Yes thats right @manodwhb
I take body of SQSQueue and pass as a context parameter to tRunJob2. I don't want to wait till trunjob2 completes, rather once trunjob2 is triggered (like asynchonous call, where the parent job won't wait till the child job completes), I want the next iteration to start. Is this possible?
Thanks,
Lakshmi
@lakshmiy , I do not think that way can implem
did you try Iterate link ( instead of main link) . This will allow the tRunJob to run in // but number of // jobs will be fixed.
https://stackoverflow.com/questions/49104058/how-to-invoke-a-child-job-asynchronously
Also try once "use as independent job" . but I am not sure if will solve the problem.
Abhishek
Hi akumar,
This will work only if we want to run multiple jobs in parallel in the parent job. But I want the child job to run asynchronously and parent job to continue to the next loop rather than waiting for child job to complete.
One solution I found is to use a metaservlet API truntask to run the job asynchronously, but this would require the job to be deployed in TAC.
Thanks,
Lakshmi