gpt4 book ai didi

error-handling - Mendix错误处理中的自定义错误

转载 作者:行者123 更新时间:2023-12-03 07:53:04 26 4
gpt4 key购买 nike

我现在正在进行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



问题的微流是:

enter image description here

我的理解是:

当mainmicroflow中发生错误时,应该回滚Create Order,但是应该提交Customer Change,因为主microflow使用 Custom with Rollback,而在sub microflow中,Orderline和Log应该都提交,因为submicroflow使用 Custom without Rollback

题:

为什么正确答案 The Order, OrderLine, and Log objects are rolled back while the Customer object is committed to the database
以下是图像作为证明:

enter image description here

最佳答案

请注意,我三年前曾在Mendix的微流引擎上工作,但许多事情已经发生了变化。看来您使用的是新的概念,即错误事件(退出亚微流),根据https://docs.mendix.com/refguide/error-event上的文档,该事件会抛出先前捕获的错误。

我猜测这就是为什么这种情况的发生,并且如果您要在处理错误后退出带有正常结束事件的亚微流,则期望提交订单/订单行/日志。

关于error-handling - Mendix错误处理中的自定义错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50125193/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com