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;
}
use of org.drools.core.common.PhreakPropagationContext in project drools by kiegroup.
the class RightBuilder method update.
public RightBuilder update(Object... objects) {
for (Object object : objects) {
InternalFactHandle fh = (InternalFactHandle) wm.insert(object);
RightTuple rightTuple = fh.getFirstRightTuple();
rightTuple.setPropagationContext(new PhreakPropagationContext());
rightTuples.addUpdate(rightTuple);
}
return this;
}
use of org.drools.core.common.PhreakPropagationContext in project drools by kiegroup.
the class LeftMemory method getLeftTuples.
public List<LeftTuple> getLeftTuples(Object... objects) {
BetaNode node = scenario.getBetaNode();
BetaMemory bm = scenario.getBm();
TupleMemory ltm = bm.getLeftTupleMemory();
InternalWorkingMemory wm = scenario.getWorkingMemory();
if (objects == null) {
objects = new Object[0];
}
List<LeftTuple> list = new ArrayList<LeftTuple>();
for (Object object : objects) {
InternalFactHandle fh = (InternalFactHandle) wm.insert(object);
LeftTuple expectedLeftTuple = node.createLeftTuple(fh, true);
expectedLeftTuple.setPropagationContext(new PhreakPropagationContext());
list.add(expectedLeftTuple);
}
scenario.setTestLeftMemory(true);
return list;
}
use of org.drools.core.common.PhreakPropagationContext in project drools by kiegroup.
the class LeftBuilder method insert.
public LeftBuilder insert(Object... objects) {
for (Object object : objects) {
InternalFactHandle fh = (InternalFactHandle) wm.insert(object);
LeftTuple leftTuple = sink.createLeftTuple(fh, true);
leftTuple.setPropagationContext(new PhreakPropagationContext());
leftTuples.addInsert(leftTuple);
}
return this;
}
Aggregations