Bug 727137

Summary: Built-in selectors in Guvnor don't work.
Product: [JBoss] JBoss Enterprise BRMS Platform 5 Reporter: Zuzana Krejčová <zkrejcov>
Component: BRM (Guvnor)Assignee: Mark Proctor <mproctor>
Status: MODIFIED --- QA Contact: Lukáš Petrovický <lpetrovi>
Severity: medium Docs Contact:
Priority: medium    
Version: BRMS 5.2.0-ER1CC: atangrin, ldimaggi, lpetrovi, trikkola
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Zuzana Krejčová 2011-08-01 12:12:05 UTC
Description of problem:

Building packages via Guvnor with built-in selectors doesn't work as expected. Each build contains all the rules in the package, not just those intended for the build.


Steps to Reproduce:

For example,starting with empty repository, install samples when asked.
1. In "mortgages" package, "Edit" view, select "Use built-in selector" and the option "When category: = Pricing rules"
2. Build the package.

(3. You can check the assets included via output in terminal or KnowledgeAgent->KnowledgeBase->KnowledgePackage.)
  

Actual results:

All the rules (and other assets) get included in the package.


Expected results:

Package with only the "Pricing loans" rule.


Additional info:

Curiously enough, custom selectors work well, both java class files and drl files.

Comment 1 Anne-Louise Tangring 2011-08-12 15:45:45 UTC
Unless this can be shown to be a regression, this is a candidate only for this release.

Comment 2 Lukáš Petrovický 2011-08-19 11:58:04 UTC
Zuzka, is this a regression compared to BRMS 5.1?

Comment 3 Zuzana Krejčová 2011-08-30 08:59:57 UTC
No regression, worked the same way in 5.1. Sorry for the delay.

Comment 4 Jervis Liu 2011-09-20 07:37:47 UTC
Fixed. 

Please note, selectors have no effect on package source code, check https://issues.jboss.org/browse/GUVNOR-108.

Comment 5 lcarlon 2011-09-22 04:57:43 UTC
Hi Jervis,

I trying to figure out what is needed for the release notes for this issue.

Guvnor-108 explains the way selectors should work, has anything changed here? I only ask because the issue is listed as being ON_QA, but from Guvnor-108 I wouldn't have expected anything to change.

Thanks
Lee

Comment 6 Jervis Liu 2011-09-23 03:05:14 UTC
Hi Lee, as far as the release note is concerned, it should be enough to say that this issue fixed the problem described by this issue, i.e: "Building packages via Guvnor with built-in selectors doesn't work as expected. Each build contains all the rules in the package, not just those intended for the build."

Comment 7 lcarlon 2011-09-23 03:29:50 UTC
Thanks Jervis,

I've marked this issue as not needing a release note, as the issue reported was in fact the correct behavior.

Comment 8 Jervis Liu 2011-09-23 09:29:00 UTC
Hi Lee, the problem reported by this issue is indeed a bug.  The issue has been fixed in this release.

Comment 9 Zuzana Krejčová 2011-09-29 11:29:49 UTC
Hi Jervis, this doesn't look ideal yet. Though most cases work.

I have categories like this:
 cat1
 cat2
 cat2/cat3

and rules:
 rule1 in cat1 and cat3
 rule2 in no category

If I choose to build a package with rules NOT in cat3:
 rule1 gets included, though it should not be, and 
 rule2 isn't included though it should be.

Comment 10 Anne-Louise Tangring 2011-09-30 17:14:12 UTC
This issue is not raised as a blocker for this release. Therefore it is rejected for the current release and will be proposed for the next release.

Comment 11 Jervis Liu 2011-10-01 04:06:05 UTC
So generally built-in selector works now, though there r still 2 edge cases that it failed to handle properly: 

1. When the asset has not category
2. When the asset has more than one categories and the operator is "!=".