Visual Workflow – Time-based Workflow Schedule Date Keeps Getting Pushed Forward

asynchronousrecordtriggeredflowvisual-workflowworkflow

I created a record triggered after update flow that tests if a field has changed in the entry criteria, allowing me to create an async path:

enter image description here

When a record is updated, the immediate path executes, well, immediately. However, the async path gets queued and I can see the workflow by looking at the Time-based Workflow queue in Salesforce:

enter image description here

The strange thing is, the Time-based Workflow never executes. When the scheduled date/time arrives, Salesforce changes the scheduled date/time to about 5 more minutes in the future. I've been watching this happen for about 1 hour now and cannot figure out why the work is not executing.

Best Answer

The issue is there's an exception in the async path.

Salesforce reschedules the async for + n minutes on the hope the issue is transient or, you are able to fix the issue.

I've seen a couple of failure uses cases:

  • The async path was calling an invocable apex that used SOQL and I forgot to include a field needed later in the apex logic
  • A non-async scheduled path had a logic error that was not caught by debugging.

Regardless, you should get a Flow exception email when the async (or scheduled) path occurs outlining the details.