Bug 1256335

Summary: default package-name-white-list is too restrictive
Product: [Retired] JBoss BRMS Platform 6 Reporter: Zuzana Krejčová <zkrejcov>
Component: Business CentralAssignee: Toni Rikkola <trikkola>
Status: CLOSED EOL QA Contact: Lukáš Petrovický <lpetrovi>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.2.0CC: kverlaen, lpetrovi, trikkola
Target Milestone: DR2   
Target Release: 6.3.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-27 20:10:22 UTC Type: Enhancement
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Zuzana Krejčová 2015-08-24 11:32:23 UTC
Description of problem:
When you create a new project, the package-name-white-list is created as well and filled with a default of <groupID>.<artifactId>.** which restricts the classes usable in any guided editor to those under that package.
User only trying out a few things will not even notice and just worry why the editors don't see the new Data Objects, if he creates them in package <groupID>.

For a user just trying out a few things, package-name-white-list won't be the first thing to check and fix and the dummy data objects probably won't be in the deepest package.
If someone creates a project actually meant for business, the package structure will change and the data objects probably won't go (only) into the <groupID>.<artifactId>.** packages. So a change to the package-name-white-list will be required again.

Keeping the package-name-white-list file empty might be a better default.


Version-Release number of selected component (if applicable):
6.2 ER1

Comment 1 manstis 2015-08-24 12:12:20 UTC
The package-name-white-list was added for https://bugzilla.redhat.com/show_bug.cgi?id=1155371 to limit the classes analysed. Simply defaulting to an empty file would only lead to this referenced BZ being re-opened. There needs to be a more intelligent solution. 

For example, when authoring classes using the Data Object Modeller we could add "new" packages automatically to the package-name-white-list. We could also provide the user with a "pick list" of packages contained in dependencies when added to the Project that would be appended to the package-name-white-list (i.e. "Please select the packages containing classes required for authoring..." type selector).

It would be good for you to liaise with Justin Holmes (reporter of the referenced BZ, jholmes) to agree a more complete and generally acceptable solution.

Comment 2 Zuzana Krejčová 2015-08-24 13:16:35 UTC
(In reply to manstis from comment #1)
> The package-name-white-list was added for
> https://bugzilla.redhat.com/show_bug.cgi?id=1155371 to limit the classes
> analysed. Simply defaulting to an empty file would only lead to this
> referenced BZ being re-opened. There needs to be a more intelligent
> solution. 
> 
> For example, when authoring classes using the Data Object Modeller we could
> add "new" packages automatically to the package-name-white-list. We could
> also provide the user with a "pick list" of packages contained in
> dependencies when added to the Project that would be appended to the
> package-name-white-list (i.e. "Please select the packages containing classes
> required for authoring..." type selector).
> 
> It would be good for you to liaise with Justin Holmes (reporter of the
> referenced BZ, jholmes) to agree a more complete and generally
> acceptable solution.

That sounds very interesting actually. I think it would make working with package-name-white-list and data objects much more pleasant. I'll get in touch with Justin Holmes.

Thanks for the reminder - I totally overlooked that default as being a part of that BZ. I think that the reason I haven't hit the same thing sooner is that earlier, when creating new project, the current package was set to be the deepest level created by default. Now it dropped me into the default (top most) package.. caught me by surprise. :-D

Comment 3 Justin Holmes 2015-08-25 00:48:04 UTC
Mich(In reply to manstis from comment #1)

> For example, when authoring classes using the Data Object Modeller we could
> add "new" packages automatically to the package-name-white-list. We could
> also provide the user with a "pick list" of packages contained in
> dependencies when added to the Project that would be appended to the
> package-name-white-list (i.e. "Please select the packages containing classes
> required for authoring..." type selector).

This is a solid approach, although I'm not sure what the workflow for such a prompt would be. 

In general, the goal of this feature is to help preserve performance when the KieModule's pom.xml is polluted with dependencies that are not needed for modeling (but perhaps for execution or testing). I don't want to prescribe an implementation, so let's take a behavior driven approach. IMHO there are two key scenarios here:


Given a KieModule loaded in Business Central
When loading the data model for guided editing takes less than 2 seconds
Then I should be able to see new data objects available as facts in the guided editor  

Given a KieModule loaded in Business Central
When loading the data model for guided editing takes more than 2 seconds
Then I should receive an alert that the data model has become polluted
And an administrator should be contacted with guidance on how to restrict the packages used in the data model


Let me know if you want to talk through these scenarios in more detail

Comment 4 Toni Rikkola 2016-01-22 10:37:40 UTC
https://issues.jboss.org/browse/GUVNOR-2273

The latest changes change the package white list to white list all the models in the current project by default. Listing them in the white list file is no longer needed. Any packages from the dependencies still need to be white listed.