Bug 1331701

Summary: The data enumerations obtained from external sources are loaded several times during the same session
Product: [Retired] JBoss BRMS Platform 6 Reporter: Oscar Molina <omolinab>
Component: BREAssignee: manstis
Status: CLOSED EOL QA Contact: Marek Winkler <mwinkler>
Severity: high Docs Contact:
Priority: unspecified    
Version: 6.3.0   
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: 2020-03-27 19:06:34 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
Example repository to import in the business-central
none
Java helper class used in the project none

Description Oscar Molina 2016-04-29 10:10:40 UTC
Created attachment 1152206 [details]
Example repository to import in the business-central

Description of problem:

As we can read in section 6.7.3 of the JBoss BRMS User Guide [1], "The data enumerations are loaded the first time the guided editor is used in a session". Unfortunately it doesn't seem correct. We have created a guided decision table where most of the conditions fields are list of values based on Java helper classes and some fields depend on others. Every time the content of a cell is modified, we can see multiple logs in the console which makes us believe that the enumerations are loaded several times during the same session.

[1] https://access.redhat.com/documentation/en-US/Red_Hat_JBoss_BRMS/6.2/html-single/User_Guide/index.html#Obtaining_Data_Lists_from_External_Sources

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

- BRMS 6.2.0

How reproducible:

We have attached a reproducer. In this project, there is a simple guided decision table based on 2 condition columns and 1 action column. The cells are populated via list of values defined in an enumeration which is based on the attached Java helper class. We have added explicit logs every time one of the 2 lists of values is refreshed. So every time you will modify the content of a cell, you will notice multiple logs in the console, which makes us believe that the enumerations are loaded several times during the same session.

Steps to Reproduce:
1. Download and extract the content of the attachments:
   - "repository1.zip": example repository to import in the business-central.
   - "enum-loader-src.zip": java helper class used in the project.
2. Go to "enum-loader" location and build the project:
   - mvn clean install
3. Login to business-central
4. Go to Authoring -> Artifact repository
5. Upload the artifact located in "enum-loader/target"
6. Go to Authoring -> Administration
7. Import "repository1" as "repository2" for example
8. Go to Authoring -> Project Authoring
9. Open "TestTable" in guided decision table
10. Remove all the rows
11. Add two rows
12. Entering some values for both "Manufacturer" and "Model" in both rows
13. Clear logs (you'll likely have lots of calls to the helper class in getting this far)
14. Change the value of a "Model" cell; I'd expect *one* call to the helper class - to get the list of Models for the Manufacturer on the same row
15. Change the value of a "Manufacturer" cell; I'd expect *two* calls to the helper class - one to get the list of Manufacturers; and another to get the list of Models for the newly selected Manufacturer

Actual results:

When we change the value of a "Model" cell, we can see 5 calls to the helper class.

When we change the value of a "Manufacturer" cell we can see 3 calls to the helper class.

Expected results:

When we change the value of a "Model" cell, we expect 2 calls to the helper class - one to get the list of Manufacturers; and another to get the list of Models for the newly selected Manufacturer.

When we change the value of a "Manufacturer" cell we expect *one* call to the helper class - to get the list of Models for the Manufacturer on the same row.

Additional info:

Comment 1 Oscar Molina 2016-04-29 10:11:41 UTC
Created attachment 1152208 [details]
Java helper class used in the project