Bug 1035267 - "Rule Template" Improve validation message when "template data" is not filled out
Summary: "Rule Template" Improve validation message when "template data" is not filled...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: Business Central
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
medium
Target Milestone: ER6
: 6.0.0
Assignee: manstis
QA Contact: Tomas David
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-11-27 12:16 UTC by Amana
Modified: 2018-12-03 20:49 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-06 20:18:00 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker GUVNOR-2065 0 Major Resolved "Rule Template" validation fails when "template data" is not filled out 2014-01-16 14:02:42 UTC

Description Amana 2013-11-27 12:16:58 UTC
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.

Comment 2 manstis 2013-11-27 12:46:40 UTC
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.

Comment 4 JBoss JIRA Server 2013-12-02 14:02:22 UTC
Michael Anstis <michael.anstis> updated the status of jira GUVNOR-2065 to Resolved

Comment 5 Tomas David 2014-01-16 14:02:26 UTC
Verified on BRMS 6.0.0.ER7.


Note You need to log in before you can comment on or make changes to this bug.