Some autocommitted objects still existed on logout for session. Our system is deleting POs that have already been sent to clients.

2
Hi There Users in our system send Purchase orders to clients then they go missing,  this only happens 4 to 5 times a month. I am definitely committing the Purchase order...I commit it more than i should, when i open the form, on close on all OCH microflows.  Has any body had similar problems. I have looked at all the default close button to make sure there is no rollback. I commit the shit out of the entity. What am i missing, This does not happen all the time and the users say they create and send the PO’s the same way. I cant recreate the problem myself...what else can i look for? Some autocommitted objects still existed on logout for session Autocommitted objects are newly created objects which were not yet committed, but are inserted into the database because an associated object was committed. Autocommitted objects should explicitly have been committed, please check your model and apply the necessary changes. The autocommitted objects have been deleted from the database to prevent database corruption.Number of autocommitted objects per type which still existed for this session: - PurchasesAndSales.PurchaseOrder: 1 object(s).
asked
2 answers
2
  1. The debugging that Courtney Scott Dean old you about two months ago did not help?
  2. Can you check your domain model for any association to PurchaseOrder that has delete-behaviour enabled in such a way that if the other object gets deleted, also PurchaseOrder gets deleted.
  3. Add Before- and Afterdelete events (ADe_PurchaseOrder) to entity PurchaseOrder and make them log the user and every other relevant information you can think of.
answered
1

I have also been struggling with an autocommitted issue and have found something that can cause this but is not obvious on first look and is intermittent.

It may help you with your problem, it may not.

Two entities with a 1-2-1 association. Delete behaviour is set so that Entity2 will remain if Entity 1 is deleted but Entity 1 will be removed when Entity 2 is deleted.

Within a MF - entity1 is created and has the commit flag set to false – (autocommit object)

Same MF entity 2 is created with commit flag true and attributes set. Association to Entity1 is also set. – (normal object)

Further MF activity continues along with a change action to Entity1. Attributes are set in here and so is the association to Entity2.  A page is then opened with this Entity which has a standard Save and Cancel button. 

User clicks Save and immediately logs out – autocommit error is logged and Entity 2 is lost.

I have a 3rd entity behaving in the same manner as entity 1 but without the initial association to Entity 2 being set on the Create action. This object never suffers from the autocommit situation.

 

So the result is that by setting an association on a normal Entity, even with the commit flag set, using an autocommitted entity for the value can cause your normal Entity to be lost. (This only happens for me if the user logs out soon afterwards.)

 

answered