I have a question:
How to make the Rule Engine (Drools 3) to fire a rule in such a way.
For example:

if  I have a rule just like this:


  |     rule "test 1"
  |     
  |     when
  |             test1 : String()
  |             test2 : String()
  |     then
  |             System.out.println(  "test1 = "+test1 );
  |             System.out.println(  "test2 = "+test2 );
  |             
  |     end
  | 

and i have a piece of code just like this:

  |     workingMemory.assertObject("STRING1");
  |     workingMemory.assertObject("STRING2");
  |     workingMemory.fireAllRules();
  | 
If I run this code it will executed 2 times (the first to assert "STRING1" to 
test1 and "STRING2" to test2) and (the second to assert "STRING2" to test1 and 
"STRING1" to test2)

I do not want the Drools to do this.
Is there a way to explicit assign the first asserted object to the first 
refrence in the fact and the second asserted object to the second fact?
I do not want to check the value in LHS of the rule.
Any help will be appreciated

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3949167#3949167

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3949167


_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to