While discussing about workflow rules, I think it is also better to discuss about process builder and compare it.
Here is my testing on both workflow and process: (having re-evaluate workflow and re-evaluate enabled in process)
In a new dev org, have 3 picklist fields with options:
pl1 - 1op1,1op2,1op3
pl2 - 2op1,2op2,2op3
pl3 - 3op1,3op2,3op3
Implement 3 workflow rules as below:
Trigger if pl1==1op1. Do field updates as pl2=2op1 and pl3=3op2
Trigger if pl2==2op1. Do field updates as pl3=3op1 and pl1=1op2
Trigger if pl3==3op1. Do field updates as pl1=1op1 and pl2=2op2
If you observe above pattern, its infinite loop.
Here is how workflow rules has triggered when I updated pl1 to 1op1 from 1op2:
-----record update
-----1st workflow triggered
-----2nd workflow triggered
-----3rd workflow triggered
------------------------done - no more workflows triggered
So, there was 4 trigger cycles (before+after update trigger).
According to the point Only workflow rules that didn’t fire before will be retriggered
- the 3rd rule didnt trigger the 1st rule as it was already fired once.
Regarding the 2nd point, I was not able to achieve it with multiple combinations of field changes and workflow rules changes.
For Process Builder:
Implement 3 processes in same way as above.
Trigger if pl1==1op1. Do field updates as pl2=2op1 and pl3=3op2
Trigger if pl2==2op1. Do field updates as pl3=3op1 and pl1=1op2
Trigger if pl3==3op1. Do field updates as pl1=1op1 and pl2=2op2
The 2 field updates are 2 different immediate actions
in each process.
Here there were 22 trigger cycles. So, it was not possible to understand what was happening. This number 22 is huge. Surprisingly, there were 21 SOQL queries, 21 DML statements, 21 query rows, 21 DML rows consumed (but none in workflow rules).
Now I have deactivated 2 processes and let only 1st process active. Here are the results:
-----record update
-----1st immediate action * 6 cycles
-----2nd immediate action * 6 cycles
So, total of 13 trigger cycles. Incidentally 12 SOQL queries, 12 query rows, 12 DML statements and 12 DML rows. If you notice here, it was 2 immediate actions * 6 cycles + 1 (record update).
Now, I have modified that process to have both field updates in 1 immediate action
. Now,
----record update
----process trigger * 6 cycles
and 6 SOQL queries, 6 query rows, 6 dml statements and 6 DML rows.
Whatever we do, if criteria matches the trigger is run
1 record update trigger + (6 * Number of processes * Number of immediate actions)
. If no criteria is selected, its triggered everytime.
Finally, although well known about this difference - workflow rule triggers ONLY if pl1 value is changed from some other value to 1op1. But process builder triggers as long as the value of pl1 is 1op1.