Flow Executes on Manual Update but not Automated Update from Process Builder

process-buildervisual-workflowworkflow

I have a situation in which I'm using Process Builder to update a custom object (A2D) status (which I'm calling Technology_Lifecycle).

The Process Builder executes as intended, and the Technology_Lifecycle changes, as I expect it to, based on the criteria set in the Process Builder.

Secondly, I have a 'Flow' that is supposed to capture the Date/Time in relative date/time fields when the status updates.

The Flow executes accordingly and captures the date/time of a change to the Technology_Lifecycle status when that change occurs manually.

However, when the update to the Technology_Lifecycle status occurs based on the Process Builder workflow, the Flow to capture the date/time does not execute, and the date/time is not captured.

Any idea why this might happen?

Here are screenshots of the Flow.

This shows what starts the Flow (a record being created/updated, and to execute prior to save):
enter image description here

This shows the outcomes that state the criteria 'when the Technology_Lifecycle status is updated to (a certain status)':
enter image description here

This shows the outcome execution to update the record's date/time field, setting the date/time field to NOW() via formula:
enter image description here

Best Answer

When you manually edit and save the "Status" field, the flow fires correctly, this means there is nothing wrong with the configuration of the flow. In your case, the process builder did not trigger the flow.

A process builder field update does not trigger a "before flow" in the same transaction. A process builder field update will only cause the before trigger, after trigger and workflow rule to re-execute.

The order of execution is the reason.

  1. Manual updates the A2D record
  2. Before Flow runs (this is prior to the process builder execution)
  3. Before and After triggers execute
  4. Workflows Execute
  5. Process Builder Executes (causing #3 and #4 to re-execute)
  6. After Insert/Update Flow executes
  7. Record is saved to the database.

Hence you can see that your flow won't execute due to process builder field update in the same transaction. If you change your flow to After Insert/Update then you will see the desired result. Please try.

Lastly, it is extremely bad practice to have multiple automation per object, mixing process builder, flow, workflow and triggers. I will recommend using only one type of automation and re-architecting this. Iff this object has triggers, then any field update logic should be made inside the triggers.

Related Topic