As a best practice it is better to group all of your “Task Queue” actions in a single task event. It gives you complete control over the execution order. It also prevents unnecessary rule processing. When you commit the task changes as part of your task event, it triggers an additional round of event evaluations. If you have 2 separate “Task Queue” event handlers you’ll have two commits, which is inefficient.
I have more task events because I wanted methods to be invoked based on some business data as a condition.
For example I have the following “On Queue” task events:
taskEvent1 with no condition that invokes 2 services (List of Simple Actions)
taskEvent2 with condition1 (ex: timestamp1 not empty) that invokes 1 service
taskEvent3 with condition2 (ex: agent1 not empty) that invokes another service
If you say that having just one task event is more efficient, then I can certainly make only one.
I have 2 followup questions however:
Are the services specified in the “Action List” for a task event going to be executed in the order they are displayed there.
What is better: to have a task event that invokes one service with all the processing logic you need or to have a task event that invokes 2 or more services where you break the processing logic into chunks as you like.