What Happens To "Inflight" Process Builders When You Activate a new Version?
tl;dr : If an individual record is in a "Paused Flow Interview" state, and you create a new version of the Process Builder, the record will "wake up" at its specified time and complete the actions as specified in the version of the PB that was active when the record entered the paused state.
There is some confusion as to what happens to Process Builders that have "inflight" time-based actions when you create a new version of the PB.
I conducted the following test - I'm going to create a PB, create a test record, and see what happens if I update the PB while the record is pending. One of three things is going to happen:
- Nothing will happen to the record
- The record will be updated according to the original version of the PB that it was invoked against
- The record will be updated according to the updated version of the PB that is active at the "wake-up time"
Using a Utility Object in my Summer '20 sandbox, I created a PB:
This PB will simply fire when a Utility Object is created (with a test flag), wait an hour, and then update the record with a value.
I then created a Utility Object that met my criteria. I got the following in Setup > Paused Flow Interviews:
While that record was in waiting state, I updated the PB.
1. Clone the PB
2. Update the PB to write a different value in the field
3. Activate the PB
The PB now has Version 2 active, and Version 1 is inactive.
ResultsThe original Paused Flow Interview was not changed. It remained tied to Version 1 of the PB. Note: the "Current Flow Version" column still read 1, although I would have expected it to read 2 since 2 is current. So this column seems untrustworthy.
At the one hour mark, the Paused Flow Interview disappeared from the queue. And the record?
Thanks for doing the experiment - this saved me doing the same as I wondered the exact same thingReplyDelete