AnsweredAssumed Answered

Behavior Execution onCommit and not beforeCommit

Question asked by xian on Nov 17, 2010
Latest reply on Nov 18, 2010 by xian
I have a policy that detects node creation and passes the reference to another thread for processing. The problem is that the policies behaviour is executed before the transaction has finished committing and so the worker thread can't 'see' the new node in its transaction if it begins execution soon enough. Is there a way to trigger the policy execution after the commit, or in the policy queue some kind of task for when it finishes comitting?

Some code from the policy class:

   public void init() {
         new JavaBehaviour(


   public void onCreateNode(ChildAssociationRef car) {
      sender.queueItem(car.getChildRef(), false);