Let's take a relatively simple set of automation applied to a single object:
- A workflow rule with a field update
- A recursion-enabled process that updates the record which starts the process
- An Apex trigger
When a transaction is processed, how many times do each of the above automation components execute in that single transaction? The answers below may surprise you/
| Component Type | Num Executions |
|---|---|
| Workflow Rule | 1 |
| Process | 6 |
| Trigger | 8 |
The exact step order in which the components were executed is illustrated below.
| Workflow Rule | Process | Trigger |
|---|---|---|
| 1 | ||
| 2 | ||
| 3 | ||
| 4 | ||
| 5 | ||
| 6 | ||
| 7 | ||
| 8 | ||
| 9 | ||
| 10 | ||
| 11 | ||
| 12 | ||
| 13 | ||
| 14 | ||
| 15 |
The takeaway should be that developers ought to be very careful when adding automation to an environment that uses "all of the above", meaning workflow rules, processes, and triggers.