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

Overall Task Count for a Recipe with numerious Recipe Function Calls

RussellJ
Deputy Chef III
Deputy Chef III

I have a solution that triggers a core Recipe and that Recipe then invokes a number of Recipe Functions to do discrete parts of the overall process.  Depending on the exact input data being consumed the invocations of the various Recipe Functions, and also the task usage, can vary.

My issue is that at the moment, when I'm asked "what's the average number of tasks used" for the solution, I go and manually check the dashboard before and after each run and then repeat this for a bunch of runs to get an average, which is a bit dull. 

I know you can see the number of Tasks used against an individual job but that doesn't help with my scenario as I'd have to go and add up the usage for all of the Recipe Functions being called as well as the parent Recipe.

I was hoping that the RecipeOps action might hold the key.  You can see various metrics like "Available Task Count" as the output from that action.  So my cunning plan was to use that action at the start of the main Recipe, stash the value in a variable and then check it again at the end.  The delta would be the total number of tasks used during the period of running the job. 

Obviously other jobs running at the time would also impact the result using this method, but at least it would give me some kind of metric. 

My idea to use "Available Task Count" doesn't work because it looks like Workato doesn't update this value whilst a Recipe is running.  I added the RecipeOps action twice - once at the start and once at the end of my main recipe but the values for "Available Task Count" are reported identically as the output from both actions.

I'm hoping there's a really simply solution and I've gone off on a wild goose chase ๐Ÿ˜€

2 REPLIES 2

gary1
Star Chef I
Star Chef I

I can't believe RecipeOps doesn't include the number of tasks. This is mind boggling! 

If it did, I would say run job history and pluck out records using the root job ID and then sum up the tasks.

RussellJ
Deputy Chef III
Deputy Chef III

@gary1  - thanks for the suggestion, but like you say, Search Job History doesn't look like it returns a task count.

But I need to backtrack on my original post... I've revisited this and my approach as outlined above does actually work (checking the value of "Available Task Count" at the start and end of the Recipe).  I think I was checking another value by mistake (?Alloted Task Count... which won't change from run to run).

Obviously the same issue is present - other Recipes running that consume tasks at the same time will impact the result, so it's not really doing what I'm after, but its close enough.  At present in my Dev system that's not an issue and over the test runs I'll just ignore any values that seem outliers.