Object of type ... with guid ... cannot be updated, as it does not exist anymore in before commit

2
Something strange happens since migration to Mendix 8. I have a before commit microflow updating an entity. It closes normally, with the record with id ‘...’  existing and state ‘normal'. No other microflows are executed after this one. The form and log display the title error message on the same entity and the same id. Anybody an idea on what happened?  
asked
2 answers
2

I know this is a long time ago, but it was the latest post on this error, so I share it here.
I got the same error.
I modified the process and escaped the error.
Here is what happened

Before the fix.
1. create Commit ObjectA.
2. with rollback in an event handler within another process
3. commit ObjectA with Commit action
→ Error here.

After fix.
Create Commit ObjectA 2.
Control with no event handler in another process. 3.
Commit ObjectA with Commit action.

This is a Bug in Mendix in my opinion.
Because the Commit in Mendix is not a Commit in transaction, so the whole thing is rolled back.
When you debug, the Object you tried to Commit remains, but when you try to Commit, you get an error. Inconsistency.
It is better if it is not a Bug with a name like autocommit.

I know this is a long time ago, but it was the latest post on this error, so I share it here.
I got the same error.
I modified the process and escaped the error.
Here is what happened

Before the fix.
1. create Commit ObjectA.
2. with rollback in an event handler within another process
3. commit ObjectA with Commit action
→ Error here.

After fix.
Create Commit ObjectA 2.
Control with no event handler in another process. 3.
Commit ObjectA with Commit action.

This is a Bug in Mendix in my opinion.
Because the Commit in Mendix is not a Commit in transaction, so the whole thing is rolled back.
When you debug, the Object you tried to Commit remains, but when you try to Commit, you get an error. Inconsistency.
It is better if it is not a Bug with a name like autocommit.

answered
1

I have encountered these kind of problems. I have seen these kind of issues when working with multiple levels of submicroflows. Only last week I had one where I commit an object pass it to a submicroflow, do some validation where in one path the object needs to be again committed and then this error complaining that the object is not there anymore.

The right sollution would be to create a support ticket if you can reproduce the problem consistently. I could solve it by rebuilding parts in the parent microflow instead of the submicroflow. But with a before commit action you do not have that option.

Regards,

Ronald

 

answered