2

I have an approval process which is fired when a record hits certain criteria.

This works correctly, but when the approval process is "approved" or "rejected", my next process builder doesn't fire.

Approval process

Specifically, I expect my process builder to fire with the field updates on final approval and final rejection (see process builder below):

Process builder conditions

However nothing is happening! If I manually change the status of the supplier to "Published" from something else, then the process builder fires and the record updates as it should.

Why would it not do so if the "Publish State" is changed through an approval process and a workflow?

Many thanks

14

In your approval process, you have field update actions. There's a tiny checkbox there that says "Re-evaluate workflow rules" or something like that.

Check that box...that also causes Process Builder rules to be evaluated.

  • 2
    I had the same problem and this worked for me! Thanks for posting! – Alexis Kasperavicius Feb 1 '17 at 17:30
-1

I believe that you are hitting an order of execution error here. What Shane is saying could potentially resolve the problem depending on when this is getting assigned.

If you are doing a field update inside of a workflow that field update does not happen until after all the workflow criterias and process builder actions take place. What you have to be careful about is having the process builder rely on a field being updated by a workflow inside of that same execution context. The object will not receive that update (populate with your assigned value) until AFTER the process builder checks have run. This causes your checks to fail inside of the process builder. I believe all workflow and process builder field updates are grouped to happen after they execute. I am, however, unsure if selecting re-evaluate will tell that process builder to run again after the field updates have happened. If this is true then what Shane proposes should resolve the issue but this is the underlying cause of why you are seeing this happen. As a general rule, I do not create process builder actions that require a workflow to assign a value in the SAME execution context.

I use this list below as a reference when I am making workflows or process builder actions.

1.The new record field values are loaded from the request and overwrite the old values

2.All before triggers execute

3.System validation occurs, such as verifying that all required fields have a non-null value, and running any user-defined validation rules

4. The record is saved to the database, but not yet committed

5. All after triggers execute

6. Assignment rules execute

7. Auto-response rules execute

8. Workflow rules execute

9. Processes

10. If there are workflow field updates, the record is updated again

11. If the record was updated with workflow field updates, before and after triggers fire one more time (and only one more time)

12. Escalation rules execute

13. Parent rollup summary formula

14. All DML operations are committed to the database

15. Post-commit logic executes, such as sending email

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.