Hide Forgot
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.)
Now the read only view is shown for globals that are not imported or when the model is not found.
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.
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.
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. -->
Is the read only mode enough or do you want the error message too?
Sorry, but I still can't open such rules. It's still the same.
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.
This issue is not proposed as a blocker. Therefor it will be rejected for the current release and proposed for the next.
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".
Created attachment 526053 [details] POJO model jar uploaded to the repo
Created attachment 526054 [details] export of repo with unopenable rule before deleting the global
Ok. Now I can reproduce it. Thanks for the export.
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.
I have the fix. If this becomes a blocker it will be a fast patch to apply.
(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!
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.
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. -->
Tested and confirm in 5.3.x the applicable Global section is disabled and a warning message shown to users.
Update status to ON_QA. Please verify them against ER6.
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...
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.