Hide Forgot
There is the following set: 1) A rule template which uses a "$X" variable of type "Integer" in the THEN clause. 2) The $X variable has not been filled out in Template Data. So it is null/empty. 3) The following error is thrown by clicking on "Validate" button: ________________________________________________________ Unable to Analyse Expression ...; drools.insert(fact0);: [Error: unable to resolve method using strict-mode: org.drools.spi.KnowledgeHelper.$X_na()][Near: {...} ] ^ [Line: 2, Column:26] ________________________________________________________ As soon as one row in the template data with the X populated with a int/Integer is entered, validation works properly. If this is the expected behaviour by not populating a variable in template data, so that message should be changed since it is too generic. It should advise that "template data" or "variable X" is not populated.
This is not a bug, but by design. We delegate validation of Rule Templates to drools-compiler, that returns the given messages. We could however improve validation of Rule Templates to check if any template variables are defined and no data present; in which case we could provide a more user-friendly message.
Michael Anstis <michael.anstis> updated the status of jira GUVNOR-2065 to Resolved
Verified on BRMS 6.0.0.ER7.