AnsweredAssumed Answered

timing between document.delete() and running query

Question asked by mcs130 on Sep 16, 2012
Latest reply on Nov 19, 2012 by jspuchau
Hello

We are doing some POC work with AF4 (4.0.e) Community Edition and Apache Chemistry 0.8.0-SNAPSHOT source (built JARs from this)

Much is working fine.

We recently noticed when either running a couple of our unit tests or performing the 2 operations in series in our custom UI's business logic, we sometimes see the 2nd operation fail with an exception.  (I have asked the developer to get the detailed trace).  In the meantime, here is the failing scenario:

Performs a delete of a document selected from a list displayed in a dialog.  This works fine every time.


document.delete(true);

To refresh the list, the developer has the code then hitting the back-end AGAIN with the same query to get the new list (which should now be 1 less since the document object was deleted successfully). 

cmisSession.query(queryString, false);

However, the page has no list because the application throws an exception.

Then we noticed that when a breakpoint is used in Debug mode and you are stepping through the code to try and isolate the breakage, which naturally slows the process… it NEVER breaks - both operations then succeed.

This lead us to think it was a "timing" issue perhaps, but not likely? However, when the developer forced a sleep of say 500 ms between method calls being done in the UI… it works again.

Ironically, another ECM product being used for the POC work, an SP2103 preview, does NOT exhibit this behavior for THIS use-case - however, there have been other  challenges with SP that we have encountered which AF4 is far better at handling correctly.

Thanks

Outcomes