Bug 731654 - Unable to open a rule that uses a global variable when the variable isn't imported into package.
Summary: Unable to open a rule that uses a global variable when the variable isn't imp...
Keywords:
Status: VERIFIED
Alias: None
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: User Interface
Version: BRMS 5.2.0-ER1
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: BRMS 5.3.0.GA
Assignee: Toni Rikkola
QA Contact: Lukáš Petrovický
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-08-18 08:57 UTC by Zuzana Krejčová
Modified: 2016-08-01 01:12 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
In the BRMS web interface, if a rule uses a global variable that hasn't been imported into the package an error message should be displayed, however, a bug in the code prevented the error message from displaying. This has been resolved and the error message is now displayed.
Clone Of:
Environment:
Last Closed:
Type: ---


Attachments (Terms of Use)
export of repo with unopenable rule (27.11 KB, application/xml)
2011-10-03 12:30 UTC, Zuzana Krejčová
no flags Details
POJO model jar uploaded to the repo (999 bytes, application/octet-stream)
2011-10-03 12:31 UTC, Zuzana Krejčová
no flags Details
export of repo with unopenable rule before deleting the global (27.19 KB, text/xml)
2011-10-03 12:33 UTC, Zuzana Krejčová
no flags Details

Description Zuzana Krejčová 2011-08-18 08:57:36 UTC
Description of problem:

When you try, in Guvnor, to open a rule, that uses some global variable, but you didn't import that global variable into the package (or Global Area, if the rule is in it), the rule isn't opened and the user doesn't get any error message. 
Browser's error console states: "Error: uncaught exception: java.lang.IllegalStateException: couldn't find type for variable: <global variable name>"

(When promoting an asset or changing its package, the needed types and global variables aren't imported into Global Area or that package.)

Comment 1 Toni Rikkola 2011-09-20 09:58:57 UTC
Now the read only view is shown for globals that are not imported or when the model is not found.

Comment 2 lcarlon 2011-09-23 02:14:10 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
In the BRMS web interface, if a rule a uses a global variable that hasn't been imported into the package an error message should be displayed, however, a bug in the code prevented the error message from displaying. The read only view is now shown for global variables that have not been imported.

Comment 3 lcarlon 2011-09-23 02:14:39 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1 +1 @@
-In the BRMS web interface, if a rule a uses a global variable that hasn't been imported into the package an error message should be displayed, however, a bug in the code prevented the error message from displaying. The read only view is now shown for global variables that have not been imported.+In the BRMS web interface, if a rule uses a global variable that hasn't been imported into the package an error message should be displayed, however, a bug in the code prevented the error message from displaying. The read only view is now shown for global variables that have not been imported.

Comment 4 lcarlon 2011-09-30 03:30:58 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1 +1 @@
-In the BRMS web interface, if a rule uses a global variable that hasn't been imported into the package an error message should be displayed, however, a bug in the code prevented the error message from displaying. The read only view is now shown for global variables that have not been imported.+In the BRMS web interface, if a rule uses a global variable that hasn't been imported into the package an error message should be displayed, however, a bug in the code prevented the error message from displaying. <!-- The read only view is now shown for global variables that have not been imported. -->

Comment 5 Toni Rikkola 2011-09-30 08:47:12 UTC
Is the read only mode enough or do you want the error message too?

Comment 6 Zuzana Krejčová 2011-09-30 12:07:10 UTC
Sorry, but I still can't open such rules. It's still the same.

Comment 7 Zuzana Krejčová 2011-09-30 13:20:23 UTC
Found a scenario, where it works:

Create a rule and use a global variable in it. Save and close it. Open the package containing the rule and go to the Edit view, remove that global variable and reopen the rule - without saving the package.

If you do save the package after removing the global variable, you won't be able to reopen the rule. I tried it even with brand new blank repository.

Comment 8 Anne-Louise Tangring 2011-09-30 17:12:35 UTC
This issue is not proposed as a blocker. Therefor it will be rejected for the current release and proposed for the next.

Comment 9 Zuzana Krejčová 2011-10-03 12:30:11 UTC
Created attachment 526046 [details]
export of repo with unopenable rule

Toni, a simple repo - I took a clean one, created a model - see attachment - imported it, made a global, saved package, created a rule with the global, saved it, deleted the global, saved the package. Cannot open the rule "unableToOpen".

Comment 10 Zuzana Krejčová 2011-10-03 12:31:12 UTC
Created attachment 526053 [details]
POJO model jar uploaded to the repo

Comment 11 Zuzana Krejčová 2011-10-03 12:33:31 UTC
Created attachment 526054 [details]
export of repo with unopenable rule before deleting the global

Comment 12 Toni Rikkola 2011-10-03 15:09:34 UTC
Ok. Now I can reproduce it. Thanks for the export.

Comment 13 Lukáš Petrovický 2011-10-03 16:07:08 UTC
Since we finally came to a functional reproducer, I propose this for 5.2 as a blocker. This is a regression since 5.1 and should be fixed.

Comment 14 Toni Rikkola 2011-10-04 09:55:04 UTC
I have the fix. If this becomes a blocker it will be a fast patch to apply.

Comment 15 Lukáš Petrovický 2011-10-04 10:41:35 UTC
(In reply to comment #14)
> I have the fix. If this becomes a blocker it will be a fast patch to apply.

I see that the fix involves a translation component. Since I don't think we can get Japanese/Chinese translations in time for the GA, I am removing the blocker? flag.

Toni, I will leave this issue open for inclusion in BRMS 5.3 - pending decision which branch will that release come from. Thanks for fixing this!

Comment 16 Toni Rikkola 2011-10-04 10:50:32 UTC
The fix now shows the error message about the missing model (Thats where the translation component change came from). It still opens the rule and the row that was using the model is disabled.

Comment 17 lcarlon 2011-10-05 04:24:22 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1 +1 @@
-In the BRMS web interface, if a rule uses a global variable that hasn't been imported into the package an error message should be displayed, however, a bug in the code prevented the error message from displaying. <!-- The read only view is now shown for global variables that have not been imported. -->+In the BRMS web interface, if a rule uses a global variable that hasn't been imported into the package an error message should be displayed, however, a bug in the code prevents the error message from displaying. <!-- The read only view is now shown for global variables that have not been imported. -->

Comment 18 manstis 2012-04-04 08:53:20 UTC
Tested and confirm in 5.3.x the applicable Global section is disabled and a warning message shown to users.

Comment 19 Ryan Zhang 2012-04-23 07:37:54 UTC
Update status to ON_QA. Please verify them against ER6.

Comment 20 Zuzana Krejčová 2012-04-24 10:22:54 UTC
The rule can be opened now. Setting to verified. 

Though it's a bit unfortunate that, as https://bugzilla.redhat.com/show_bug.cgi?id=724474 describes, the irrelevant, frozen, disabled line(s) can't be removed...

Comment 22 lcarlon 2012-05-31 01:42:35 UTC
    Technical note updated. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    Diffed Contents:
@@ -1 +1 @@
-In the BRMS web interface, if a rule uses a global variable that hasn't been imported into the package an error message should be displayed, however, a bug in the code prevents the error message from displaying. <!-- The read only view is now shown for global variables that have not been imported. -->+In the BRMS web interface, if a rule uses a global variable that hasn't been imported into the package an error message should be displayed, however, a bug in the code prevented the error message from displaying. This has been resolved and the error message is now displayed.


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