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.
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.
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