congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
InternalWorkingMemory.getAgenda
Code IndexAdd Tabnine to your IDE (free)

How to use
getAgenda
method
in
org.drools.common.InternalWorkingMemory

Best Java code snippets using org.drools.common.InternalWorkingMemory.getAgenda (Showing top 16 results out of 315)

origin: org.drools/droolsjbpm-ide-common

public void activateRuleFlowGroup(String activateRuleFlowGroupName) {
  workingMemory.getAgenda().getRuleFlowGroup( activateRuleFlowGroupName ).setAutoDeactivate( false );
  workingMemory.getAgenda().activateRuleFlowGroup( activateRuleFlowGroupName );
}
origin: org.chtijbug.drools/droolsjbpm-ide-common

public void activateRuleFlowGroup(String activateRuleFlowGroupName) {
  workingMemory.getAgenda().getRuleFlowGroup( activateRuleFlowGroupName ).setAutoDeactivate( false );
  workingMemory.getAgenda().activateRuleFlowGroup( activateRuleFlowGroupName );
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.drools

public DeactivateCallback(MarshallerReaderContext context) throws IOException {
  this.ruleFlowGroup = (InternalRuleFlowGroup) context.wm.getAgenda().getRuleFlowGroup( context.readUTF() );
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.drools

public DeactivateCallback(MarshallerReaderContext context,
             ProtobufMessages.ActionQueue.Action _action) {
  this.ruleFlowGroup = (InternalRuleFlowGroup) context.wm.getAgenda().getRuleFlowGroup( _action.getDeactivateCallback().getRuleflowGroup() );
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.drools

private ActiveActivationIterator(InternalWorkingMemory wm) {
  agenda = (DefaultAgenda) wm.getAgenda();
  if ( !agenda.getAgendaGroupsMap().isEmpty() ) {
    groupsIter = agenda.getAgendaGroupsMap().values().iterator();
    group = AGENDA_GROUPS;
    InternalAgendaGroup group = null;
    for ( ; groupsIter.hasNext();) {
      group = (InternalAgendaGroup) groupsIter.next() ;
      if ( !group.isEmpty() ) {
        activations = (Activation[]) group.getActivations();
        return;
      }
    }
  }
  
  if ( !agenda.getRuleFlowGroupsMap().isEmpty() ) {
    groupsIter = agenda.getRuleFlowGroupsMap().values().iterator();
    group = RULEFLOW_GROUPS;
    RuleFlowGroupImpl group = null;
    for ( ; groupsIter.hasNext();) {
      group = (RuleFlowGroupImpl) groupsIter.next() ;
      if ( !group.isEmpty() ) {
        activations = (Activation[]) group.getActivations();
        return;
      }
    }
  }        
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.drools

public void retractLeftTuple(final LeftTuple leftTuple,
               final PropagationContext context,
               final InternalWorkingMemory workingMemory) {
  Object obj = leftTuple.getObject();
  // activation can be null if the LeftTuple previous propagated into a no-loop
  // or could be true due to lock-on-active blocking activation creation
  if ( obj == null || obj == Boolean.TRUE) {
    return;
  }
  Activation activation = (Activation) obj;
  activation.setMatched( false );
  
  InternalAgenda agenda = (InternalAgenda) workingMemory.getAgenda();
  agenda.cancelActivation( leftTuple, 
               context, 
               workingMemory, 
               activation, 
               this );
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.drools

public void read(MarshallerReaderContext inCtx) throws IOException, ClassNotFoundException {                       
  int leftTupleId = inCtx.readInt();
  LeftTuple leftTuple = inCtx.terminalTupleMap.get( leftTupleId  );
  ScheduledAgendaItem item = ( ScheduledAgendaItem ) leftTuple.getObject();
  
  Trigger trigger = InputMarshaller.readTrigger( inCtx ); 
  
  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 );            
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.drools

  activation = new ScheduledAgendaItem( activationNumber,
                     leftTuple,
                     (InternalAgenda) wm.getAgenda(),
                     pc,
                     ruleTerminalNode );
  ( (DefaultAgenda) wm.getAgenda() ).getActivationGroup( activationGroupName ).addActivation( activation );
  agendaGroup = (InternalAgendaGroup) ( (DefaultAgenda) wm.getAgenda() ).getAgendaGroup( AgendaGroup.MAIN );
} else {
  agendaGroup = (InternalAgendaGroup) ( (DefaultAgenda) wm.getAgenda() ).getAgendaGroup( rule.getAgendaGroup() );
    agendaGroup.add( activation );
  } else {
    InternalRuleFlowGroup rfg = (InternalRuleFlowGroup) ( (DefaultAgenda) wm.getAgenda() ).getRuleFlowGroup( rule.getRuleFlowGroup() );
    rfg.addActivation( activation );
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.drools

private void triggerActivations() {
  // iterate all activations adding them to their AgendaGroups
  final Iterator<ActivationNode> it = this.list.iterator();
  for ( ActivationNode node = it.next(); node != null; node = it.next() ) {
    final Activation activation = node.getActivation();
    ((InternalAgendaGroup) activation.getAgendaGroup()).add( activation );
  }
  // making sure we re-evaluate agenda in case we are waiting for activations
  ((InternalAgenda) workingMemory.getAgenda()).notifyHalt();
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.drools

public static void writeAgenda(MarshallerWriteContext context) throws IOException {
  InternalWorkingMemory wm = context.wm;
  DefaultAgenda agenda = (DefaultAgenda) wm.getAgenda();
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.drools

private static void writeAgenda(MarshallerWriteContext context,
    ProtobufMessages.RuleData.Builder _ksb) throws IOException {
  InternalWorkingMemory wm = context.wm;
  DefaultAgenda agenda = (DefaultAgenda) wm.getAgenda();
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.drools

if ( ((InternalAgenda) wm.getAgenda()).isDeclarativeAgenda() ) {
  ActivationIterator it = ActivationIterator.iterator( wm );
  matchFactHandles = new ArrayList<InternalFactHandle>( 100 );
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.drools

public void assertLeftTuple(final LeftTuple leftTuple,
              final PropagationContext context,
              final InternalWorkingMemory workingMemory) {
  //check if the rule is not effective or
  // if the current Rule is no-loop and the origin rule is the same then return
  if ( (!this.rule.isEffective( leftTuple,
                 this,
                 workingMemory )) ||
     (this.rule.isNoLoop() && this.rule.equals( context.getRuleOrigin() )) ) {
    leftTuple.setObject( Boolean.TRUE );
    return;
  }
  final InternalAgenda agenda = (InternalAgenda) workingMemory.getAgenda();
  boolean fire = agenda.createActivation( leftTuple,
                      context, 
                      workingMemory, 
                      this, 
                      false );
  if( fire && !fireDirect ) {
    agenda.addActivation( (AgendaItem) leftTuple.getObject() );
  }
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.drools

private static void assertHandleIntoOTN(MarshallerReaderContext context,
                    InternalWorkingMemory wm,
                    InternalFactHandle handle) {
  Object object = handle.getObject();
  InternalWorkingMemoryEntryPoint ep = (InternalWorkingMemoryEntryPoint) handle.getEntryPoint();
  ObjectTypeConf typeConf = ((InternalWorkingMemoryEntryPoint) handle.getEntryPoint()).getObjectTypeConfigurationRegistry().getObjectTypeConf( ep.getEntryPoint(),
                                                                         object );
  PropagationContextImpl propagationContext = new PropagationContextImpl( wm.getNextPropagationIdCounter(),
                                      PropagationContext.ASSERTION,
                                      null,
                                      null,
                                      handle,
                                      ((DefaultAgenda) wm.getAgenda()).getActiveActivations(),
                                      ((DefaultAgenda) wm.getAgenda()).getDormantActivations(),
                                      ep.getEntryPoint(),
                                      context);
  ep.getEntryPointNode().assertObject( handle,
                     propagationContext,
                     typeConf,
                     wm );
  propagationContext.evaluateActionQueue( wm );
  wm.executeQueuedActions();
  propagationContext.cleanReaderContext();
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.drools

  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 );            
  }
}
origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.drools

public void modifyLeftTuple(LeftTuple leftTuple,
              PropagationContext context,
              InternalWorkingMemory workingMemory) {
  InternalAgenda agenda = (InternalAgenda) workingMemory.getAgenda();
org.drools.commonInternalWorkingMemorygetAgenda

Popular methods of InternalWorkingMemory

  • addEventListener
  • fireAllRules
  • getSessionClock
  • insert
  • removeEventListener
  • retract
  • getObjectStore
  • iterateObjects
  • setGlobal
  • update
  • activationFired
    This method is called by the agenda right after an activation was fired to allow the working memory
  • addLIANodePropagation
  • activationFired,
  • addLIANodePropagation,
  • clearNodeMemory,
  • endOperation,
  • executeQueuedActions,
  • getCalendars,
  • getEntryPoint,
  • getEntryPointNode,
  • getEntryPoints

Popular in Java

  • Start an intent from android
  • setScale (BigDecimal)
  • findViewById (Activity)
  • getContentResolver (Context)
  • FileOutputStream (java.io)
    An output stream that writes bytes to a file. If the output file exists, it can be replaced or appen
  • URI (java.net)
    A Uniform Resource Identifier that identifies an abstract or physical resource, as specified by RFC
  • StringTokenizer (java.util)
    Breaks a string into tokens; new code should probably use String#split.> // Legacy code: StringTo
  • HttpServlet (javax.servlet.http)
    Provides an abstract class to be subclassed to create an HTTP servlet suitable for a Web site. A sub
  • JComboBox (javax.swing)
  • JList (javax.swing)
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now