[rules-users] Can't check if an attribute is member of an object of class class com.sample.WorkDays

2008-10-03 Thread Marcin Krol
I'm doing this: ThermostatTimeData ttd1 = new ThermostatTimeData("January", "Monday", 14); session.insert(ttd1); WorkDays wd = new WorkDays(); session.insert(wd); session.fireAllRules(); printoutThermostatData(ttd1); and then this: rule "Rule 1" when $wd : com.sample.WorkDays() $ttd :

Re: [rules-users] Working with collections

2008-10-01 Thread Marcin Krol
the List in question, because when I leave only this as condition of the rule, it still cannot fire: import com.sample.WorkDays; rule "Rule 1" when $wd : WorkDays() then System.out.println("Rule 1 fired."); end On Sat, Sep 27, 2008 at 2:04 AM, Marcin Krol <[EMAI

[rules-users] Working with collections

2008-09-26 Thread Marcin Krol
Hello everyone, I'm a beginner in Drools, so please account for that. :-) How do I use memberOf operator when working with collections? Depending on a day of week, I want to check if a day is a working day or weekend day. I tried this: package com.sample dialect "mvel" import com.sample.Ther

[rules-users] firing rules again?

2008-08-22 Thread Marcin Krol
Hello everyone, I have a session to rule base: RuleBase rb = RuleBaseFactory.newRuleBase(); rb.addPackage( pb.getPackage() ); StatefulSession session = rb.newStatefulSession(); Two questions: 1. When I call session.fireAllRules(), I find I can no longer add new facts

[rules-users] Unable to create restriction '[QualifiedIndentifierRestr: != $nissan.pos ]' for field 'pos' , in the rule 'Racing order'

2008-08-20 Thread Marcin Krol
Hello everyone, The same problem regards the "golfing example" from examples project. Adding nearly any restrictions, e.g. this one: position != $tom.position, in rules for Bob: // Bob is wearing plaid pants $bob : Golfer( name == "Bob",

[rules-users] Unable to create restriction '[QualifiedIndentifierRestr: != $nissan.pos ]' for field 'pos' , in the rule 'Racing order'

2008-08-20 Thread Marcin Krol
Hello everyone, I managed to produce my first example of Drools rules. However, I am having problems with some field restrictions: Racing order:Unable to create restriction '[QualifiedIndentifierRestr: != $nissan.pos ]' for field 'pos' in the rule 'Racing order' The problem is only SOME fie

Re: [rules-users] new user - running examples

2008-08-20 Thread Marcin Krol
ds, Marcin - Original Message ---- From: Marcin Krol <[EMAIL PROTECTED]> To: rules-users@lists.jboss.org Sent: Tuesday, August 19, 2008 8:52:56 PM Subject: [rules-users] new user - running examples Hello everyone, I am totally new to Drools (I have basic exposure to Java, nothing more), h

[rules-users] new user - running examples

2008-08-19 Thread Marcin Krol
Hello everyone, I am totally new to Drools (I have basic exposure to Java, nothing more), hope that someone helps me with the following problem: I have successfully imported Eclipse plugin and ran the DroolTest.java example in Eclipse Europa (it worked OK). Then I imported Eclipse example (4