/** * Test if two activations are equal. * @param o The object to test. */ public boolean equals(Object o) { if(o==this) return true; boolean ret = false; if(o instanceof Activation) { Activation act = (Activation)o; ret = rule.equals(act.getRule()) && values.equals(act.values); } return ret; }
/** * Test if two activations are equal. * @param o The object to test. */ public boolean equals(Object o) { if(o==this) return true; boolean ret = false; if(o instanceof Activation) { Activation act = (Activation)o; ret = rule.equals(act.getRule()) && values.equals(act.values); } return ret; }
/** * Execute the activation. */ public void execute() { getRule().getAction().execute(state, values); }
/** * Execute the activation. */ public void execute() { getRule().getAction().execute(state, values); }
/** * Test if the component's execution is currently at one of the * given breakpoints. If yes, the component will be suspended by * the platform. * @param breakpoints An array of breakpoints. * @return True, when some breakpoint is triggered. */ public boolean isAtBreakpoint(String[] breakpoints) { // assert isAgentThread(); assert !getAgentAdapter().isExternalThread(); boolean isatbreakpoint = false; Object cs = state.getAttributeValue(ragent, OAVBDIRuntimeModel.agent_has_state); if(cs!=null && !OAVBDIRuntimeModel.AGENTLIFECYCLESTATE_TERMINATED.equals(cs)) { Set bps = new HashSet(Arrays.asList(breakpoints)); // Todo: cache set across invocations for speed? Iterator it = getRuleSystem().getAgenda().getActivations().iterator(); while(!isatbreakpoint && it.hasNext()) { IRule rule = ((Activation)it.next()).getRule(); isatbreakpoint = bps.contains(rule.getName()); } } // else still in init return isatbreakpoint; }
public void actionPerformed(ActionEvent e) { if(followact.isSelected()) { Activation act = system.getAgenda().getNextActivation(); if(act!=null && followact.isSelected()) { rulebasepanel.setSelectedBreakpoints(new String[]{act.getRule().getName()}); } } else { rulebasepanel.setSelectedBreakpoints(new String[0]); } } });
if(act!=null && followact.isSelected()) rulebasepanel.setSelectedBreakpoints(new String[]{act.getRule().getName()});
while(it.hasNext()) IRule rule = ((Activation)it.next()).getRule(); if(breakpoints.contains(rule.getName()))
while(it.hasNext()) IRule rule = ((Activation)it.next()).getRule(); if(breakpoints.contains(rule.getName()))
state.getProfiler().start(IProfiler.TYPE_RULE, act!=null?act.getRule():null); state.expungeStaleObjects(); state.notifyEventListeners(); state.getProfiler().stop(IProfiler.TYPE_RULE, act!=null?act.getRule():null); act = rulesystem.getAgenda().getLastActivation(); state.getProfiler().start(IProfiler.TYPE_RULE, act!=null?act.getRule():null); state.expungeStaleObjects(); state.notifyEventListeners(); state.getProfiler().stop(IProfiler.TYPE_RULE, act!=null?act.getRule():null);