Setting a task to be dependent on 2 filtered tasks guarantees that the current task will still run, regardless of which filtered task is included in the job.
For example, you might have a job where 2 versions of the same task exist:
- One task is filtered to only run when the bookkeeping method for a particular client is "manual"
- The other task is filtered to only run if the client does their bookkeeping online
Take a look at our accounts production job below, where 2 different filtered versions of the email task are set to run, depending on whether the option for manual or online bookkeeping has been selected for a client.
The first task is filtered for manual bookkeeping, and the second task is filtered for online bookkeeping.
There is then a third task, which we want to run after task 1 for manual bookkeeping clients, or after task 2 for online bookkeeping clients.
To ensure this, task 3 has been set to be dependent on the completion of both task 1 and task 2. Only task 1 or task 2 will be part of the job, but task 3 will run afterwards in either case.