【问题标题】:How to resolve a Salesforce flow error where Flow calls an apex class如何解决 Flow 调用顶点类的 Salesforce 流错误
【发布时间】:2021-03-07 22:45:20
【问题描述】:

我有一个调用 apex 类的流程,这里是执行日志错误,如何解决此错误

流程“ServiceAppointment_API”期间发生错误:发生 Apex 错误:System.AsyncException:

Warning: Approaching hourly email limit for this flow.
Each flow in your organization is limited to 100 error emails per hour. Since 12:00 PM, Salesforce has sent 99 error emails for ServiceAppointment_API flow. After 100 emails, Salesforce suppresses all error emails for this flow. The limit resets at 1:00 PM.
Error element myWaitEvent_myWait_myRule_3_event_0_SA1 (FlowActionCall).
An Apex error occurred: System.AsyncException: You've exceeded the limit of 100 jobs in the flex queue for org 00D36000000rhGR.
 Wait for some of your batch jobs to finish before adding more. To monitor and reorder jobs, use the Apex Flex Queue page in Setup.

感谢您的帮助

问候, 卡罗琳

【问题讨论】:

    标签: salesforce apex-code salesforce-service-cloud salesforce-communities


    【解决方案1】:

    apex 类会安排一些异步(后台)处理。可以是批处理作业,可以是使用 @future 注释的方法或称为 Queueable 的东西。在给定时间,您最多可以提交 100 个此类文件,并且最多可以有 5 个处于活动状态(正在运行)。

    不看代码很难说如何修复。

    也许不需要@future,开发人员的本意是好的,但出了点问题。也许它必须是异步的,但可以通过基于时间的工作流程或流程构建器中的预定操作来完成? 也许这是您的错误,可以重写代码以更快地工作或一次处理超过 1 条记录。 也许这不是你的错,也许有一个托管包安排了很多作业,而下一个作业无法提交。 也许您需要考虑将其分离但更多的重写。说而不是几乎即时处理 - 让代码每 5 分钟运行一次,检查最近是否有需要处理的更改并执行。

    【讨论】:

      猜你喜欢
      • 2019-11-05
      • 1970-01-01
      • 2017-05-01
      • 2011-11-17
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-12-14
      相关资源
      最近更新 更多