cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

How to get a trigger from recipe function?

bhavesh-patel
Deputy Chef III
Deputy Chef III

How can we know that if recipe function called from a parent function is completed all it's job? Is there any trigger we can use to see if recipe function has completed all jobs so we can trigger an email like all jobs are completed.


If somebody has done it, please let us know.


Thanks in advance.

1 ACCEPTED SOLUTION

kkamal
Deputy Chef II
Deputy Chef II

This is old thread but interesting one. Here's how I would solve this issue this today: 

Context: You have parent recipe calling child recipes (async) so it wont return data from child. You want to know if all the child calls have been completed. 

I believe RecipeOps Connector by workato can help writing optimized recipe for this. (heres the api i would recommend https://docs.workato.com/connectors/recipeops/actions/search-job-history.html#recipeops-search-job-h...

One solution could be in line of having a scheduled job to check failed, pending jobs and using "Calling job ID" attribute to understand whats completed. You can maintain some state of Parent Job Ids in Lookup Table for quick access. 

View solution in original post

13 REPLIES 13

We can try this, so we can create a list in 3rd recipe but how we will know that all jobs are completed? we are looking for that trigger which shows us that jobs are completed in 2nd recipe

Another way to add error moniter block to the child recipe

sunaif-aziz
Deputy Chef I
Deputy Chef I

If it is hours long function then I'd go for async call and for monitoring the function you may use "Wait for an async call" action in "Recipe function by workato" which periodically checks your function to complete before proceeding.

Documentation here: https://docs.workato.com/connectors/recipe-functions/actions/wait-for-async-calls.html

but that might hit the limit error in main recipe as we can't run a job for more than 90 minutes

bhavesh-patel
Deputy Chef III
Deputy Chef III

Senthilkumar K P we have done this.