public void exceptionOccurred(Exception exception) { exception.printStackTrace(); // ex = exception; // System.out.println("processAllEvents.PAE start"); processAllEvents().addResultListener(new DelegationResultListener<Void>(ret)); } });
public void resultAvailable(Collection<RuleEvent> result) { // System.out.println("processAllEvents.PAE start"); processAllEvents().addResultListener(new DelegationResultListener<Void>(ret)); }
rs.addEvent(ev); rs.processAllEvents();
rs.addEvent(ev); rs.processAllEvents();
/** * Components with autonomous behavior may override this method * to implement a recurring execution cycle. * @return true, if the execution should continue, false, if the component may become idle. */ protected boolean executeCycle() { assert isComponentThread(); // Evaluate conditions in addition to executing steps. boolean again = false; IInternalBDIAgentFeature bdif = getComponent().getComponentFeature(IInternalBDIAgentFeature.class); boolean inited = ((IInternalBDILifecycleFeature)getComponent().getComponentFeature(ILifecycleComponentFeature.class)).isInited(); if(inited && bdif.getRuleSystem()!=null && bdif.getRuleSystem().isEventAvailable()) { // System.out.println("executeCycle.PAE start"); IFuture<Void> fut = bdif.getRuleSystem().processAllEvents(); if(!fut.isDone()) getComponent().getLogger().warning("No async actions allowed."); again = true; } return again; }