use of org.drools.core.common.PhreakPropagationContext in project drools by kiegroup.
the class RightMemory method getRightTuples.
public List<RightTuple> getRightTuples(Object... objects) {
BetaNode node = scenario.getBetaNode();
BetaMemory bm = scenario.getBm();
TupleMemory rtm = bm.getRightTupleMemory();
InternalWorkingMemory wm = scenario.getWorkingMemory();
if (objects == null) {
objects = new Object[0];
}
List<RightTuple> rightTuples = new ArrayList<RightTuple>();
for (Object object : objects) {
InternalFactHandle fh = (InternalFactHandle) wm.insert(object);
// node.createLeftTuple( fh, node, true );
RightTuple expectedRightTuple = new RightTupleImpl(fh, node);
expectedRightTuple.setPropagationContext(new PhreakPropagationContext());
rightTuples.add(expectedRightTuple);
}
scenario.setTestRightMemory(true);
return rightTuples;
}
use of org.drools.core.common.PhreakPropagationContext in project drools by kiegroup.
the class RightBuilder method delete.
public RightBuilder delete(Object... objects) {
for (Object object : objects) {
InternalFactHandle fh = (InternalFactHandle) wm.insert(object);
RightTuple rightTuple = fh.getFirstRightTuple();
rightTuple.setPropagationContext(new PhreakPropagationContext());
rightTuples.addDelete(rightTuple);
}
return this;
}
use of org.drools.core.common.PhreakPropagationContext in project drools by kiegroup.
the class RightBuilder method insert.
public RightBuilder insert(Object... objects) {
for (Object object : objects) {
InternalFactHandle fh = (InternalFactHandle) wm.insert(object);
RightTuple rightTuple = new RightTupleImpl(fh, sink);
rightTuple.setPropagationContext(new PhreakPropagationContext());
rightTuples.addInsert(rightTuple);
}
return this;
}
Aggregations