public void execute(InternalWorkingMemory workingMemory) { InternalFactHandle factHandle = (InternalFactHandle) leftTuple.getObject(); if (node.isOpenQuery()) { // iterate to the query terminal node, as the child leftTuples will get picked up there workingMemory .getEntryPointNode() .retractObject( factHandle, context, workingMemory .getObjectTypeConfigurationRegistry() .getObjectTypeConf(workingMemory.getEntryPoint(), factHandle.getObject()), workingMemory); // workingMemory.getFactHandleFactory().destroyFactHandle( factHandle ); } else { // get child left tuples, as there is no open query if (leftTuple.getFirstChild() != null) { node.getSinkPropagator().propagateRetractLeftTuple(leftTuple, context, workingMemory); } } }
public void execute(InternalWorkingMemory workingMemory) { workingMemory.getEntryPointNode().modifyQuery(factHandle, context, workingMemory); }
public void execute(InternalWorkingMemory workingMemory) { // we null this as it blocks this query being called, to avoid re-entrant issues. i.e. // scheduling an insert and then an update, before the insert is executed ((DroolsQuery) this.factHandle.getObject()).setAction(null); workingMemory.getEntryPointNode().assertQuery(factHandle, context, workingMemory); }