Question-Answer from Learning Path

1
Hi, When I tried to practice one question from one of the topic from advance learning Path. I see, possible option/answer is not available in the list for that question. Am I correct or missing anything there as I tested the behavior in Mx Pro.   Topic : How to Handle Errors Sub-Topic : Advance Error Handling Situations Question Number : 4 th. Below link can help to reach out the topic.   https://academy.mendix.com/link/modules/32/lectures/207/4.3-Knowledge-Check-%E2%80%93-Advanced-Error-Handling-Situations     What I see after testing the behavior in Mx Pro, It only creates two objects Order and Customer in DB after running this. It didn’t create Log and OrderLine.    Thanks, Amol Salunke,
asked
3 answers
0

Hey Amol!

Now seeing your microflow I think you are trying to test the 5th question right? Because the fourth question uses custom with rollback in the parent microflow.

 

I have checked your microflow that corresponds to the last question. This is something I found when I was preparing my advanced certification. You are completely correct, Order and Customer will be commited to the database and Log and Order Line will be rolled back. The behaviour of the custom without rollback is to commit everything that is before the activity and in the error flow. But every object inside the activity will be rolled back the same as when It uses the custom with rollback.

This behaviour is odd because you will find more questions about this that are wrong and reading the paths it seems that custom without rollback conserves all the objects but that’s not true.

 

Kind Regards,

Emilio

answered
1

When I execute below MFs, I am not getting the behavior which you get, there is small difference, I am using one activity (create one activity ‘one divide by zero’ to throw error )  insteadof  ‘ThrowsAnError’.

Below are the MFs and domain model that I am using. It doesn’t create Log and OrderLine object in DBs.

 

 

 

answered
0

Hi Amol!

I have tested this just to be sure and the correct answer is:

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

When you have Custom With rollback as handler every object created or changed before and inside the activity is rolled back only the things that are inside the custom error flow will be applied.

You said that your application creates two objects and that’s strange. Is it changing the value of the customer?

Looking forward to your response

Kind Regards,

Emilio

answered