[jboss-svn-commits] JBL Code SVN: r24388 - labs/jbossrules/trunk/drools-core/src/main/java/org/drools/common.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Mon Dec 15 19:04:36 EST 2008
Author: KrisVerlaenen
Date: 2008-12-15 19:04:36 -0500 (Mon, 15 Dec 2008)
New Revision: 24388
Modified:
labs/jbossrules/trunk/drools-core/src/main/java/org/drools/common/DefaultAgenda.java
Log:
JBRULES-1895: Rule constraints can use processInstance variable to refer to current process instance
- binding process instance to current process instance when evaluating constraint
JBRULES-1896: Support kcontext variable in rules and processes
- adding support in core and compiler for kcontext variable
Modified: labs/jbossrules/trunk/drools-core/src/main/java/org/drools/common/DefaultAgenda.java
===================================================================
--- labs/jbossrules/trunk/drools-core/src/main/java/org/drools/common/DefaultAgenda.java 2008-12-15 23:48:45 UTC (rev 24387)
+++ labs/jbossrules/trunk/drools-core/src/main/java/org/drools/common/DefaultAgenda.java 2008-12-16 00:04:36 UTC (rev 24388)
@@ -29,15 +29,13 @@
import java.util.Map;
import java.util.concurrent.atomic.AtomicBoolean;
+import org.drools.WorkingMemory;
import org.drools.base.DefaultKnowledgeHelper;
import org.drools.base.SequentialKnowledgeHelper;
import org.drools.common.RuleFlowGroupImpl.DeactivateCallback;
import org.drools.impl.StatefulKnowledgeSessionImpl;
import org.drools.reteoo.LeftTuple;
-import org.drools.reteoo.ReteooStatefulSession;
import org.drools.reteoo.ReteooWorkingMemory;
-import org.drools.RuleBaseConfiguration;
-import org.drools.WorkingMemory;
import org.drools.spi.Activation;
import org.drools.spi.ActivationGroup;
import org.drools.spi.AgendaFilter;
@@ -976,18 +974,18 @@
/**
* @inheritDoc
*/
- public boolean isRuleActiveInRuleFlowGroup(String ruleflowGroupName,
- String ruleName) {
+ public Activation isRuleActiveInRuleFlowGroup(String ruleflowGroupName,
+ String ruleName) {
RuleFlowGroup systemRuleFlowGroup = this.getRuleFlowGroup( ruleflowGroupName );
for ( Iterator<RuleFlowGroupNode> activations = systemRuleFlowGroup.iterator(); activations.hasNext(); ) {
Activation activation = activations.next().getActivation();
if ( ruleName.equals( activation.getRule().getName() ) ) {
- return true;
+ return activation;
}
}
- return false;
+ return null;
}
public void addRuleFlowGroupListener(String ruleFlowGroup,
More information about the jboss-svn-commits
mailing list