public void deserialize(MarshallerReaderContext inCtx, Timer _timer) throws ClassNotFoundException { ActivationTimer _activation = _timer.getActivation(); LeftTuple leftTuple = inCtx.filter.getTuplesCache().get( PersisterHelper.createActivationKey( _activation.getActivation().getPackageName(), _activation.getActivation().getRuleName(), _activation.getActivation().getTuple() ) ); ScheduledAgendaItem item = (ScheduledAgendaItem) leftTuple.getObject(); Trigger trigger = ProtobufInputMarshaller.readTrigger( inCtx, _activation.getTrigger() ); DefaultAgenda agenda = ( DefaultAgenda ) inCtx.wm.getAgenda(); ActivationTimerJob job = new ActivationTimerJob(); ActivationTimerJobContext ctx = new ActivationTimerJobContext( trigger, item, agenda ); JobHandle jobHandle = ((InternalWorkingMemory)agenda.getWorkingMemory()).getTimerService().scheduleJob( job, ctx, trigger ); item.setJobHandle( jobHandle ); } }
public Builder mergeFrom(org.drools.marshalling.impl.ProtobufMessages.Timers.ActivationTimer other) { if (other == org.drools.marshalling.impl.ProtobufMessages.Timers.ActivationTimer.getDefaultInstance()) return this; if (other.hasActivation()) { mergeActivation(other.getActivation()); } if (other.hasTrigger()) { mergeTrigger(other.getTrigger()); } this.mergeUnknownFields(other.getUnknownFields()); return this; }