Hi i have had another go at this,trynig to learn DRL and hthen applying it to
my spreadsheet. The below is what i have so far:
in java i create:
List<Car> list = new ArrayList<Car>();
Car o1 = ...
Car o2 = ...
list.add(o1);
list.add(o2);
Test t = new Test(list);
Car is: (name, value)
DRL Rules:
rule "Test"
dialect "java"
when
test : Test
vals : Car()(name == "A") from test.getData()
then
// do something
end
Spreadsheet:
RuleSet org.uk
import org.uk.Car
Declare declare Car
name : String
value : String
end
Notes
RuleTable Test Rules
CONDITION CONDITION ACTION
test:Test
vals:Car (name == "$param") from
test.getData() test.setResult("$param");
A PASS
In my spreadsheet I had to put the 'from' part as part of its own condition
as I was getting a mismatched input error. The error I now get is "Unable
to create reader for 'Car etc',
Am i on the right lines with the spreadsheet part, or is this still way off
track?
Thanks,
--
View this message in context:
http://drools.46999.n3.nabble.com/Decision-Table-Help-tp4019281p4020293.html
Sent from the Drools: User forum mailing list archive at
Nabble.com.