I think the use of the cache for PO objects in Adempiere is quite problematic, in the past I found a couple of bug related to this problem:
The move to ZK complicate this even further, that's what I found lately:
Value Workflows are retrieved with the method org.compiere.wf.MWorkflow.getDocValue(Properties, int, int, String) as soon as the first PO.Save() is called, that means for instance as soon as a new MSession is created. The method loads into the cache every Value Workflow the first time is called, subsequent call just return the cached object. The problem, once again, is with the context, if the clients/orgs are different, for instance because the first call was made by system or because you do have multiple clients/orgs then the behavior is quite erratic. For example in our test it was creating the workflow activity under system (ad_client_id=0) and not under the correct client. As a quick patch I completely disabled the use of the cache inside the method, but I'm sure we will find other similar situations.
Log in to post a comment.