Bug 724198 (BRMS-141) - When there are 2 bound variables in a guided rule, and you map a third fact with one of the attribute, then there a blank screen and the guided rule never shows again
Summary: When there are 2 bound variables in a guided rule, and you map a third fact w...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: BRMS-141
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: BRM (Guvnor)
Version: 5.0.0 GA
Hardware: Unspecified
OS: Unspecified
urgent
unspecified
Target Milestone: ---
: 5.0.2
Assignee: Toni Rikkola
QA Contact:
URL: http://jira.jboss.org/jira/browse/BRM...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-06-22 17:12 UTC by Jaroslaw Kijanowski
Modified: 2010-09-03 09:57 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2010-03-23 11:49:41 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker BRMS-141 0 Critical Closed When there are 2 bound variables in a guided rule, and you map a third fact with one of the attribute, then there a blan... 2014-01-21 09:55:49 UTC

Description Jaroslaw Kijanowski 2009-06-22 17:12:20 UTC
Date of First Response: 2009-08-26 11:46:49
securitylevel_name: Public

Comment 1 Jaroslaw Kijanowski 2009-06-22 17:12:46 UTC
Link: Added: This issue depends GUVNOR-362


Comment 2 Jervis Liu 2009-08-26 15:46:49 UTC
Corresponding Guvnor Jira has been closed by Toni.

Comment 3 Jaroslaw Kijanowski 2010-03-23 11:49:41 UTC
Verified in BRMS 5.0.2 CR1

Comment 4 Dana Mison 2010-04-20 09:33:15 UTC
Sorry I need more information for this JIRA for the release notes.  

Consequence - The user would encounter this when?
"if a rule had two facts each with bound variables, adding a fact with an attribute set to one of the bound variables of the other two facts"  
Is that an accurate description ?  (I'm not familiar with "bound variables" )

Can you please clarify: "then there a blank screen and the guided rule never shows again"

Cause:
What was going wrong here generally ?  eg. value was not checked for null, only reading the first element in the list etc

Fix & Result:
Did anything have to be changed other than "fixing the cause"?  Is there any new behavior aside from "now works as expected" ?


Comment 5 Toni Rikkola 2010-04-21 10:56:21 UTC
Consequence
User adds a Car pattern and gives it a variable name AA
User adds another pattern called Address and gives it a variable name BB
User adds a third fact called Person and he tries to check if persons address is BB. ( Person.address == BB )

This causes a problem in the code. I saw nothing visible after I did the steps, but after I saving it I tried to reopen it and the editor could not open anymore. Other editors worked fine.

Cause:
There are two variables in the rule and the types are different. Another one is Car and another one is Address. 
When the editor is refreshed the code counts every pattern variable in the rule and thinks that they are in the restriction list box and that they can be compared to Person.address field. Because BB is the second variable in the rule, the code counts up to two and tries to set that as the selected index. This is where it fails, since there is no such index in the list box.

Fix:
The list box contains only one variable and that is correct. 
Fix makes it count only the variables of type Address, because the field can only be compared to Address objects.


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