0

We have multiple rules setup for Case using process builder but one of the rule seems to be failing throwing CPU Time Limit Exceeded error. The process is failing at this step where i am updating OwnerID with LastModifiedById since there are a total of 5 million Cases.

enter image description here

enter image description here

enter image description here

I would like to know if there's a way to call a batch class in the immediate action leaving the criteria as-is? How can i query the cases in batch apex that i could call here in the process builder?

Thanks in advance.

  • Where does the 5 million Cases come into play? Are you running a bulk data update across your entire table? – David Reed Nov 12 at 3:12
  • @david we have Case Merge Premium appexchange app which our users use to merge duplicates into one case and status for all duplicates will be Duplicate. That's when this criteria is being picked up. – SunnyG Nov 12 at 3:19
  • Process Builders are notorious in being very inefficient in CPU terms. You would probably be better off turning the more complex ones into a mix of trigger and async processing. – Phil W Nov 12 at 7:12
0

CPU time limit is exceeding due to processing of large number of records with given logic. https://welkinsuite.com/blog/how-to-get-past-apex-cpu-limits/

Apart from this, you can call Batch class from Process builder or Trigger. You can try with Batch from Trigger and run it Async. Using Code you can put your logic to filter out only those records need to be updated.

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.