function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SF ABCSF ABC 

Visual flow fast updates seem to fire workflows which should not be fired

It seems fast updates in a visual flow will fire workflows whose entry criteria are not met. Evaluation Criteria for the workflows are set as:
- Evaluate the rule when a record is created, and any time it's edited to subsequently meet criteria

The updates (changes) in the visual flow are not relevant to the criteria of those workflows.
Ie, the workflow actions (field updates and email alerts) are just fired by the visual flow updates as if the entry criteria of the workflows are ignored.

This seems to be a terrible BUG for visual flow or flow applications.

The following is a brief description of the visual flow in question:
- A screen element to collect lookup criteria, e.g. CreateDate, Status
- Fast lookup element based on the criteria to get a collection of the Sobject (say, case) and save Id and field_a
- Loop through the collection
- Assign {!$GlobalConstant.EmptyString} to field_a for each record in the loop. (this is to trigger some intended processes)
- Add the record in the loop to a collection object variable (Cases_ToBeUpdated)
- Use a counter in the loop to control the number of the records (say, 50 records) to be updated.
- If the counter reaches the limit (50 records) or when the loop ends, use Fast Update to update the collection object variable (Cases_ToBeUpdated).

The results are:
- field_a of the cases is updated
- Processes associated with field_a are fired as expected. These processes are not able to make any changes that may fire the problematic workflows.
- Workflows are fired even though the entry criteria are not met. (UNEXPECTED)
Gaurav HandooGaurav Handoo
Hi

Could you recheck the entry criteria for the problematic workflow, the Evaluation critiera says that whenever it subsequently meets the criteria. This means, that previous value was not a part of entry critieria while the current value is a part of entry criteria.

Given that you are updating field_a from your Flow, which in-turn is invoking some other processes/workflow, recommendation here would be check if any of these processes/flows are updating a field that is being used as the input criteria for field_a.

If required, you can connect with me over gaurav.handoo@gmail.com

Hope this helps. Please mark as best answer if it does.

Cheers!!

Gaurav
SF ABCSF ABC
Hi Gaurav,

Thanks for the reply.
I checked the criteria of the workflows and confirmed the criteria can't be met by the visual flow's Fast Update and/or the consequent processes invoked.
It seems the Fast Update just fires most (maybe all, not confirmed) workflow actions of the object without evaluating the entry criteria of those workflows, which is really bad. 
I logged a support ticket with SF and hopefully will have a clear answer for the issue.
Gaurav HandooGaurav Handoo
Hi

I checked the same, and whenever there is an update via Record Update or Fast Update, all the workflows/validations/process builders are evaluated for execution.

Regards

Gaurav
SF ABCSF ABC
Hi Gaurav,

Yes, it is expected that "all the workflows/validations/process builders are evaluated for execution" after Record Update or Fast Update.

But the issue here is that SF evaluates the workflow rules as
"Evaluate the rule when a record is created, and every time it's edited"
even though they are set as
"Evaluate the rule when a record is created, and any time it's edited to subsequently meet criteria".

Therefore, some unexpected workflow actions (email alerts, field updates) were just fired
Gaurav HandooGaurav Handoo
Hi

Would it be possible to connect over a screenshare session. You can get in touch with me at gaurav.handoo@gmail.com

Regards

Gaurav