自定义错误的 Mendix 错误处理

Mendix Error Handling for Custom Error

我现在正在进行 Mendix 培训。我被错误处理部分的知识检查中的一个问题所困扰。问题在下面

What happens if the same microflows are used, but the error handling on the main microflow is Custom with Rollback and the error handling on the sub-microflow is Custom without Rollback?

正确答案是:

The Order, OrderLine, and Log objects are rolled back while the Customer object is committed to the database

问题的微流程是:

我的理解是:

当主微流程中发生错误时,创建订单应该回滚,但应该提交客户更改,因为主微流程使用 Custom with Rollback,在子微流程中,Orderline 和 Log 都应该提交,因为submicroflow 使用 Custom without Rollback.

问题:

为什么是正确答案The Order, OrderLine, and Log objects are rolled back while the Customer object is committed to the database

下图为证:

请注意,3 年前我曾在 Mendix 工作,开发他们的微流引擎(以及其他),但很多事情都发生了变化。看来您正在使用一个对我来说很新的概念,即错误事件(您退出子微流的地方),根据 https://docs.mendix.com/refguide/error-event 处的文档,它会重新抛出之前捕获的错误。

我猜这就是发生这种情况的原因,如果您在处理错误后使用正常的结束事件退出该子微流,我希望 order/orderline/log 能够提交。