ITransactionManager appears to have no effect on ability to rollback changes.

I need to remove a Product Instance which may have Relationships and be in another Part’s BOM. In order to call delete() on the PI, the Relationships much be removed first, however if the PI is on another Part’s BOM, the delete fails to delete. However, the Relationships have been removed.

I wanted to use the Transaction Management to rollback the Relationship change, however, it appears to have no effect on setting values, changing relationships or modifying any object what so ever.

The code is quite simple:

ITransactionManager mgr = session.getTransactionManager();
mgr.begin();

object.setValue(KEY, VALUE);
mgr.rollback();

The value of the object for KEY is still VALUE. I have tried every way to use the transaction manager but it never rolls back the data.

Any advice on how to overcome a Chicken and Egg situation?

Gist with Sample Code

Edit:

Is there any way to escalaste this? It is a severe roadblock for us as it prevents us from ensuring data integrity.

No Files Were Attached
afinnell Agile User Asked on September 26, 2018 in Other APIs.

After more testing it appears Transactions have no effect if the code is executing outside the context of a Process Extension. The Transactions appear to work when I write them as a Groovy Script on an Event. However, if I write a Java Application which uses the AgileAPI to connect to Agile, transactions no longer function. Despite no exceptions or errors being thrown. It would be great to confirm Transactions are only supposed to work within a PX. This would greatly limit our ability to integrate if that is the case.

on September 26, 2018.

I’ve had it confirmed that Transactions do not work in External applications which use the Agile SDK.

Furthermore, deleting item’s are also not within the scope of a Transaction no matter where the command runs, thus making this all a moot point for me as that was the entire reason I needed it. Quite disappointed.

on September 27, 2018.
Add Comment
0 Answer(s)

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.