// AgendaGroup is defined, so try and get the AgendaGroup
// from the Agenda
agendaGroup = (InternalAgendaGroup) ( (InternalAgenda) wm.getAgenda() ).getAgendaGroup( rule.getAgendaGroup() );
}
InternalRuleFlowGroup rfg = (InternalRuleFlowGroup) ( (InternalAgenda) wm.getAgenda() ).getRuleFlowGroup( rule.getRuleFlowGroup() );
boolean scheduled = false;
RuleTerminalNodeLeftTuple rtnLeftTuple = ( RuleTerminalNodeLeftTuple ) leftTuple;
rtnLeftTuple.init(activationNumber, salience, pc, null, agendaGroup);
activation = rtnLeftTuple;
if (rule.getTimer() != null) {
activation = new ScheduledAgendaItem( rtnLeftTuple,
(InternalAgenda) wm.getAgenda() );
scheduled = true;
} else {
}
leftTuple.setObject( activation );
if (stream.readBoolean()) {
String activationGroupName = stream.readUTF();
( (InternalAgenda) wm.getAgenda() ).getActivationGroup( activationGroupName ).addActivation( activation );
}
boolean activated = stream.readBoolean();
activation.setQueued(activated);
if (stream.readBoolean()) {
InternalFactHandle handle = context.handles.get( stream.readInt() );
activation.setFactHandle( handle );
handle.setObject( activation );
}
if (!scheduled && activated) {
if (rule.getRuleFlowGroup() == null) {
agendaGroup.add( activation );
} else {
rfg.add( activation );
}
}
throw new UnsupportedOperationException(); // MDP need to update as we now have a TMS per EntryPoint
// TruthMaintenanceSystem tms = context.wm.getTruthMaintenanceSystem();