I am currently tasked with migrating all of an Org's Workflow Rule (WFR) and Process Builder (PB) logic to Flow. This was mostly a trivial task, as each WFR entry condition and each "TRUE/FALSE blue diamond" in PB was equivalent to a Decision element in Flow, and the "TRUE" path connecting to the necessary actions (like update record, send Email Alert, Post to Chatter etc). I say this is a trivial task, because I did not need to fundamentally change the logic of the WFRs or PBs. I could just copy the entry condition into Flow (even for conditions which run only on create and when updated to meet criteria, instead of when created and updated) as well as the related actions to execute.
Now I am facing the following problem:
There are several (nine to be exact) WFRs which have the following parameters:
- The "Evaluation Criteria" is set to Evaluate the rule when a record is created, and any time it's edited to subsequently meet criteria
- Each individual rule has either an immediate field update OR a field update as a Time Based action (7 days after LastModifiedDate)
- On all these WFRs, the option "Re-evaluate Workflow Rules after Field Change" is ticked
After spending some time analyzing these WFRs, I have come to understand that they seem to be configured this way to create a sort of "loop" by always "queueing" new WFRs which fit the new condition after the field update from the old WFR. This kind of "7 day domino effect" then continues with the newly triggered/re-evaluated WFRs.
The WFRs with immediate actions (even though they need to be re-evaluated) could be mimicked in Flow by reconnecting the update element back to the top of all WFRs (to be evaluated again basically). But I cannot for the life of it figure out how I can mimic the case with Time Based Actions and "Re-evaluation" with Flow. The main issue I have is that WFRs can only run Time Based actions, if they are set to Evaluate the rule when a record is created, and any time it's edited to subsequently meet criteria, but this option is not available for Scheduled Paths: scheduled Paths will not know if the current record did not meet the conditions before.
Does anyone have an idea how I could go about this without fundamentally analysing the logic behind the WFRs and trying to implement them without "re-evaluation"?