如何解决流调用apex类时出现的Salesforce流错误

如何解决流调用apex类时出现的Salesforce流错误,salesforce,apex-code,salesforce-service-cloud,salesforce-communities,Salesforce,Apex Code,Salesforce Service Cloud,Salesforce Communities,我有一个调用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 h

我有一个调用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.
谢谢你的帮助

问候,,
Carolyn

apex类调度一些异步(后台)处理。可以是批处理作业,可以是带有@future注释的方法,或者是称为可排队的方法。在给定的时间内,最多可以提交100个,最多可以有5个处于活动状态(正在运行)

如果不看代码,很难说如何修复

也许不需要@future,开发者的本意是好的,但是出了点问题。也许它必须是异步的,但可以通过基于时间的工作流或process builder中的计划操作来完成? 也许这是您的错误,代码可以被重写以更快地工作或一次处理多条记录。 也许这不是你的错,也许有一个托管包安排了很多作业,而下一个作业却没有提交。 也许你需要考虑一个重写它,但更多。比如说,不要几乎是即时处理——让代码每5分钟运行一次,检查是否有最近更改的内容需要处理并执行