dear sir,
   
       When I run the rules,it's error.I think it because that I used "and" and 
"or" in the "not" conditional element.
        
       One condition of rule which I wrote is "  not 
state_thresh(transitionid==411, stateid==283,ruleid==47, v_sta_evtthresh 
:thresh, v_sta_cnt : count, customerid==v_customerid, srcaddress==v_srcaddress, 
v_sta_threshtimefrom : timefrom ->(new 
Integer(v_timestamp.intValue()+10).intValue()>=v_sta_threshtimefrom.intValue()),
 v_sta_threshtimeto : timeto, v_sta_timeout1 : timeout 
->((v_timestamp.intValue()<v_sta_timeout1.intValue())||((v_timestamp.intValue()<v_sta_threshtimeto.intValue())&&(v_sta_cnt.intValue()>=v_sta_evtthresh.intValue()))))"
   
      When I delete this conditional element,it works.
   
      What can i do?I want to add this fact only if the fact does not exist. 
And there is some limit in this facts.
   
      In the last email,i forgot to write the error tips.it is:
   
  "org.drools.RuntimeDroolsException: java.lang.ClassCastException: 
cn.edu.hit.Deftemplate$event
 at org.drools.rule.PredicateConstraint.isAllowed(Unknown Source)
 at org.drools.common.BetaNodeBinder.isAllowed(Unknown Source)
 at org.drools.reteoo.TupleSource.attemptJoin(Unknown Source)
 at org.drools.reteoo.NotNode.assertObject(Unknown Source)
 at org.drools.reteoo.ObjectSource.propagateAssertObject(Unknown Source)
 at org.drools.reteoo.AlphaNode.assertObject(Unknown Source)
 at org.drools.reteoo.ObjectSource.propagateAssertObject(Unknown Source)
 at org.drools.reteoo.AlphaNode.assertObject(Unknown Source)
 at org.drools.reteoo.ObjectSource.propagateAssertObject(Unknown Source)
 at org.drools.reteoo.AlphaNode.assertObject(Unknown Source)
 at org.drools.reteoo.ObjectSource.propagateAssertObject(Unknown Source)
 at org.drools.reteoo.ObjectTypeNode.assertObject(Unknown Source)
 at org.drools.reteoo.Rete.assertObject(Unknown Source)
 at org.drools.reteoo.ReteooRuleBase.assertObject(Unknown Source)
 at org.drools.reteoo.ReteooWorkingMemory.doAssertObject(Unknown Source)
 at org.drools.common.AbstractWorkingMemory.assertObject(Unknown Source)
 at org.drools.common.AbstractWorkingMemory.assertObject(Unknown Source)
 at cn.edu.hit.AssertFact.assertFact(AssertFact.java:80)
 at cn.edu.hit.AssertFact.readFact(AssertFact.java:55)
 at cn.edu.hit.AssertFact.main(AssertFact.java:25)
Caused by: java.lang.ClassCastException: cn.edu.hit.Deftemplate$event
 at 
org.drools.base.cn.edu.hit.Deftemplate$state_thresh$getThresh.getValue(Unknown 
Source)
 at org.drools.base.ClassFieldExtractor.getValue(Unknown Source)
 at org.drools.rule.Declaration.getValue(Unknown Source)
 at 
cn.edu.hit.Rule_rule_47_282_411_add_0Predicate2Invoker.evaluate(Rule_rule_47_282_411_add_0Predicate2Invoker.java:14)
 ... 20 more"
   
  jiahua Huang
  2007-04-29
   
  


       
---------------------------------
抢注雅虎免费邮箱3.5G容量,20M附件! 

Reply via email to