3

I have recently set up and activated 4 processes using the process builder to send email reminders (alerts) when records are past the due date. I needed 4 because there are 4 emails send at different times so needed 4 different schedules for the same criteria. One of these processes has 5 criteria nodes the rest have 3. After activation my test class execution time went from ~ 20 minutes to over 60. I tracked it to workflow where I found that a test class that takes 9 seconds in sandbox takes 85 in production with the debug log indicating 35 seconds for each workflow execution. There are several dozen other workflow rules but these run really fast and are just as complicated as the criteria on the process if not more so. The test class inserts 200 records that the process is based on then inserts 200 related records that update the original 200 via a trigger so the process is kicked off twice. (create/update)

My question is Are Process Builder processes really that heavy on system resources? or do I have a setting set up wrong somewhere.

  • 3
    They have a screwy interaction with tests, especially from change sets. See, for example, this known issue. – Adrian Larson May 21 '15 at 3:38
  • 1
    Process Builder is the worst some times. Some of the same power as Apex without the QA controls of at least having unit test coverage. – Scott Morrison Jun 16 '17 at 19:17
  • Is this question about testing or performance? Anywho: Processes are deployed inactive, there are some caveats around testing. I.e. deploy process first, activate, deploy Apex and tests. Last time I tried, I screwed up and decided not to rely on PB Updates in my test classes ever again. Everything will fail if Process gets deactivated and tests rely on its updates. – Christian Szandor Knapp Jan 21 '18 at 14:18
0

I'm facing a similar kind of issue. Let's try to drill this down. The work around which can be done is, disable the process builders at the time of deployment and activate once the deployment is complete. However, you need to be sure that this doesn't have a major business impact.

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.