@Override
public void generateCode(CompilationContext context, PlanContext planContext, CodeWriter w) {
if(planContext.currentId != null) {
- w.apply(location, planContext.ruleset.writeCurrentId, planContext.contextVar, planContext.currentId);
+ w.apply(location, CHRRuleset.WRITE_CURRENT_ID, planContext.contextVar, planContext.currentId);
planContext.currentId = null;
- w.apply(location, CHRRuleset.ACTIVATE, planContext.contextVar, new IntegerConstant(priority));
+ w.apply(location, CHRRuleset.ACTIVATE, planContext.contextVar, new IntegerConstant(priority+planContext.ruleset.initialPriorityNumber));
}
for(PartnerFact activeFact : planContext.partnerFacts) {
if(activeFact.killAfterMatch) {