Autocommit help

0
I am getting an autocommit error and I can’t seem to find the reason. This annoying thing is the error does not happen all the time, I estimate 99% of the records don’t get the issue.    I’ve looked through the microflows for saving and confirmed: - Set to disabled during action, to prevent double clicks - I’ve looked through the forms the record is filled out on and there are no commits in any data source or on change microflows   As far as I can see the only commits that happen during this process are in the save microflow so I don’t know how any associated objects will be getting commited. Below is the image of said commit section of the microflow.    The data base is set up as follows CoreNotification 1-1 Planned Activity 1-1 Activity 1-* Activity Image   The autocommit shows for PlannedActivity and Activity.   My first thought was that the process is erroring but still managing to continue through and commit the others. I know this as CoreNotification is commiting without issue (the users receive a notification but when they click on it get an error because planned activity cannot be found. In the autocommit instances I have seen in the log, none of them trigger the error handling on the microflow, I know his as the log message contains an error code number which I can search for.    I need to make a reprducable scenario but I am not sure how, is it possible to check the state of an object in a variable, through a java action maybe? And if it’s autocomitt I can log it and see if there is a commonality between the autocommit records?   Any help anyone can provide would be much appreciated.      
asked
2 answers
0

Hi Buddy! this might be helpful for you. Could you please refer this document to find the root cause?
https://docs.mendix.com/refguide/mobile/building-efficient-mobile-apps/offlinefirst-data/auto-committed-objects/

answered
0

Dear Garion,

As per the association you mentioned Activity 1-* Activity Image. Activity is parent entity of Activity image entity. Committing Activity image before activity will make the parent entity to be auto committed. From the mentioned microflow try to commit activity first and then commit activity image. You can also check the state of an object by debugging.
 


For more information please check https://docs.mendix.com/refguide/committing-objects/#autocommit-and-associated-objects

I hope this helps!

answered