1
votes

I need to do a rule with no constraints in a decision table.

i.e.:

    rule ...
when
    $p : Person()
then
    $p.setCity("none");
end

I tried these:

| 1 | RuleTable example                       | 
| 2 |    CONDITION    |     ACTION            | 
| 3 |    p:Person()   |                       | 
| 4 |      name       | p.setCity("$param");  | 
| 5 | description     |  config person        |
| 6 |                 |       none            | 

But when I run application throws this exception:

person cannot be resolved
Exception in thread "main" java.lang.IllegalArgumentException: No se puede parsear base de conocimiento.

2
Can you translate that error message to English :) - kaskelotti
It means "can't parse knowledge base". - Steve
Another question - is that a web based decision table in Guvnor? Or a spreadsheet decision table? - Steve
btw - If it's a Guvnor web decision table, then look at the source of the rule that is generated. That may make it obvious what you're doing wrong. If it's not obvious, then post the generated source here. - Steve
It's a spreadsheet decision table... - Hector

2 Answers

0
votes

Probably it fails because you have no real condition in your table.

Try putting $param == $param as condition

0
votes

drools

Use condition like as shown in picture. It will generate DRL as:

rule "XYZ"
    when
        doc:Document()
    then
        doc.setX("Y");
end