[rules-users] Update error: handle not found for object

hypnosat7 ablarbi at yahoo.fr
Thu Aug 2 10:12:33 EDT 2007


hi I have an exception after using an update

  This is my rule :

package packageDrlTest

#list any import classes here.
import java.lang.Integer;


#declare any global variables here

rule "incrementation"
	no-loop 
	when
		unEntier : java.lang.Integer()
	then 
		unEntier++;
		System.out.println("incrementation firing...");
		update(unEntier);
		
end


when I execute my rule on this list of facts :
		
List integerList = new ArrayList();
integerList.add(Integer.valueOf(1));
for (Object fact : integerList )
{
	session.insert(fact);  // session is a StatefulMemory
}

Update error: handle not found for object: 2. Is it in the working memory?

détails :

incrementation firing...
org.drools.FactException: Update error: handle not found for object: 2. Is
it in the working memory?
	at
org.drools.base.DefaultKnowledgeHelper.update(DefaultKnowledgeHelper.java:93)
	at
packageDrlTest.Rule_incrementation_0.consequence(Rule_incrementation_0.java:9)
	at
packageDrlTest.Rule_incrementation_0ConsequenceInvoker.evaluate(Rule_incrementation_0ConsequenceInvoker.java:22)
	at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:545)
	at org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:509)
	at
org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:430)
	at
org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:392)
-- 
View this message in context: http://www.nabble.com/Update-error%3A-handle-not-found-for-object-tf4206369.html#a11965297
Sent from the drools - user mailing list archive at Nabble.com.





More information about the rules-users mailing list