A Task is a usage metric that is counted every time Workato requests a piece of data from another platform/software or performs an action.
A recipe job may consist of multiple tasks. The number of tasks executed in a job depends on the data of the specific trigger event and the recipe logic.
# Task counting
Tasks are counted as follows:
|Trigger||Task is incremented by 1|
|Trigger conditions||Will not be counted as a Task|
|Polling||Will not be counted as a Task|
|Search/Create/Update/Get/Upsert/Lookup etc.||Task is incremented by 1 for each of these Actions|
|Actions in repeat (for each loop)||The Task is incremented by 1 for every action in the loop.|
|Control statement (If, Error monitor, stop)||Will not be counted as a Task|
|Batch/bulk operations||Task is incremented by 1|
- Tasks in failed jobs will be counted up to the failed step (ie. if a job fails at step 5, step 1-4 will be counted)
- If you call a recipe, the call to the recipe will not be counted as a Task. The triggers and the relevant actions in the recipe called will be counted as tasks.
- Batch/bulk actions are counted as one task
The examples for how tasks may be counted in recipes are as follows:
Simple recipe with one trigger and three actions
Total Tasks per job = 4 (Trigger + Step 1 + Step 2 + Step 3)
Recipe with conditional actions
Total Tasks per job = 3 (Trigger + Step 1 + Step 3) OR 4 (Trigger + Step 1 + Step 5 + Step 6) depending on the steps it executes based on the condition.
Besides conditional actions, all other control statements: Conditional action with else, Action with error monitor, Call recipe, Stop, Repeat action will not be counted as tasks.
Recipe logic with repeated actions
Actions within a Repeat action are executed multiple times according to the number of items/rows present in the list. Thus, the number of tasks is multiplied by the number of items/rows. In the image above, the 2 steps 'Create Case in Salesforce' and 'Create Case Comment in Salesforce' are the actions to be multiplied by the number of rows in the Google Sheet specified in step 1.
Total Tasks per job = 2 + (2 x no. of rows). If the number of rows in the array is 5 then 12 tasks are counted.
Recipe logic with a batch action
Every batch action is considered a single task even though multiple calls or requests may be sent/received by Workato.
Total Tasks per job = 2
The recipe step that calls another recipe is not included in the total task count. In the example above, step 2, which calls another recipe, is not included in the task count.
Total Tasks per job = 3
In the example above, the recipe fails on the 3rd step 'Get details of a specific Account in Salesforce'. There are 2 possible scenarios when this happens: all the retries fail, or at least one of the retries are successful.
If all the retries fail, then only step 1 and the 'On error' step, 'Send email via Workato' are considered Tasks. If one retry is successful, steps 2, 3 and 4 are counted as Tasks.
Total Tasks per job = 2 if all the retries fail and 3 if the retries succeed.
# Job errors and reruns
When the job results in an error, all actions that were successfully executed are counted as tasks.
Recipe failed on step 8
In the example above, the recipe failed at step 8, 'Create comment for issue in Jira'. All previously executed steps: the trigger (not shown), steps 1, 2, 6 and 7 give a total of 5 tasks.
Recipe is rerun successfully
After the error is resolved and the job is rerun, all the successfully run actions are counted as tasks. In this case, a total of 7 tasks were run in this job.