Fact type declaration is a new feature to drools 5. There is no similar in Drools 4, although it is possible to generate the facts outside of drools and use them as regular beans.

   []s
   Edson

2009/3/8 王磊 <wangjavablog@gmail.com>
Hi
   EveryBody,I want to write code like this in drools4,but I got a problem that no class defined as FactType, how to refactor it ?
RuleAgent agent = RuleAgent.newRuleAgent("/rules.properties");
        RuleBase rb = agent.getRuleBase();
        //constructor a model ,
        FactType appType = rb.getFactType("test.MerInfo");
   
        Object merinfo = appType.newInstance();
        appType.set(merinfo, "resp_code", "00");
        appType.set(merinfo, "avg_amt", 5000.0);
      
        
        StatelessSession ss =  rb.newStatelessSession();


  ss.execute(merinfo);


_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users




--
 Edson Tirelli
 JBoss Drools Core Development
 JBoss, a division of Red Hat @ www.jboss.com