public void assertObject(final InternalFactHandle factHandle,
final PropagationContext pctx,
final InternalWorkingMemory workingMemory) {
final WindowMemory memory = (WindowMemory) workingMemory.getNodeMemory(this);
EventFactHandle evFh = ( EventFactHandle ) factHandle;
// must guarantee single thread from now on
memory.gate.lock();
try {
int index = 0;
for (AlphaNodeFieldConstraint constraint : constraints) {
if (!constraint.isAllowed(evFh, workingMemory, memory.context[index++])) {
return;
}
}
RightTuple rightTuple = new RightTuple( evFh, this );
rightTuple.setPropagationContext( pctx );
InternalFactHandle clonedFh = evFh.cloneAndLink(); // this is cloned, as we need to separate the child RightTuple references
rightTuple.setObject( clonedFh );
// process the behavior
if (!behavior.assertFact(memory, clonedFh, pctx, workingMemory)) {
return;