程序在首次执行失败后,出现BPMN错误结束事件,然后超时。

huangapple go评论88阅读模式
英文:

Program throwing exception after first failed execution with BPMN Error End Event before timeout

问题

我尝试使用错误结束事件在定时边界事件定义的超时后抛出异常,定时边界事件为R5/PT10S。这意味着在5次重试内,如果执行不成功,就会抛出异常。但是我的程序在第1次执行失败后立即抛出异常。

英文:

程序在首次执行失败后,出现BPMN错误结束事件,然后超时。Hello, I’m using bpmn model like below to throw exception after timeout.

I tried to use Error End Event to throw exception after the timeout defined by Timer Boundary Event which is R5/PT10S. It means that within 5 times of retries, if the execution is not successful, the exception will be thrown out. But my program throws exception right after the 1st failed execution.

答案1

得分: 1

A) 任务“Something”的实施可能会失败并引发异常。如果这些异常不属于BPMNError类型,这将导致技术事件,该事件将使用任务属性中定义的重试机制。

B) 如果在规定的时间内未收到消息,则定时器事件将触发。这个流程路径将导致BPMN错误结束事件,将引发BPMN错误。如果未捕获此错误,它不会导致技术事件,但流程将结束。错误应该由包含BPMN错误捕获事件的父流程捕获(请参阅https://docs.camunda.io/docs/components/modeler/bpmn/error-events/)

另请参阅:https://docs.camunda.org/manual/7.19/user-guide/process-engine/error-handling/

英文:

These are two different mechanisms.

A) The implementation of the task "Something" can fail and throw exceptions. If those exception are not of type BPMNError, this will lead to a technical incident, which works with the retry mechanism defined in the task properties.

B) If the message is not received within the defined time, then the timer event will fire. This process path leads to a BPMN error end event, which will cause a BPMN error. If this error is not caught, it will not lead to a technical incident, but the process will end. The error is meant to be caught be a surrounding parent process with a BPMN error catch event. (see https://docs.camunda.io/docs/components/modeler/bpmn/error-events/)

Also see: https://docs.camunda.org/manual/7.19/user-guide/process-engine/error-handling/

huangapple
  • 本文由 发表于 2023年5月26日 12:54:30
  • 转载请务必保留本文链接:https://go.coder-hub.com/76337759.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定