Bug 724529 (BRMS-475)
Summary: | Can not use dependent enumerations in a same DSL sentence | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | [JBoss] JBoss Enterprise BRMS Platform 5 | Reporter: | Alessandro Lazarotti <alazarot> | ||||||||||
Component: | BRM (Guvnor) | Assignee: | manstis | ||||||||||
Status: | VERIFIED --- | QA Contact: | |||||||||||
Severity: | high | Docs Contact: | |||||||||||
Priority: | medium | ||||||||||||
Version: | 5.0.2 | CC: | manstis, rwagner | ||||||||||
Target Milestone: | --- | ||||||||||||
Target Release: | BRMS 5.3.0.GA | ||||||||||||
Hardware: | Unspecified | ||||||||||||
OS: | Unspecified | ||||||||||||
URL: | http://jira.jboss.org/jira/browse/BRMS-475 | ||||||||||||
Whiteboard: | |||||||||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||||||||
Doc Text: |
Using dependent enumerations in the same DSL sentence was triggering the java.lang.IndexOutOfBoundException exception. An overloaded method was created to handle dependent enumerations in the same DSL sentence, and this exception no longer occurs.
|
Story Points: | --- | ||||||||||
Clone Of: | |||||||||||||
: | 1013693 (view as bug list) | Environment: |
JBoss Enterprise BRMS 5.0.2, JDK 1.6 sun/oracle, Fedora 12
|
||||||||||
Last Closed: | Type: | Bug | |||||||||||
Regression: | --- | Mount Type: | --- | ||||||||||
Documentation: | --- | CRM: | |||||||||||
Verified Versions: | Category: | --- | |||||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||||
Embargoed: | |||||||||||||
Attachments: |
|
Description
Alessandro Lazarotti
2010-11-30 13:42:25 UTC
Attachment: Added: DSLandDependentEnum.png Attachment: Added: Exception.png Attachment: Added: repository_export.zip Link: Added: This issue related GUVNOR-1106 Seeing a somewhat different issue with the 5.2 Dev2 build - it is not possible to add the "when the vehicle engine..." condition defined in the imported to a rule. No error is logged or reported to the user. Attachment: Added: ScreenshotDev2.png Candidate. (In reply to comment #4) > Seeing a somewhat different issue with the 5.2 Dev2 build - it is not possible > to add the "when the vehicle engine..." condition defined in the imported to a > rule. > > No error is logged or reported to the user. This new related bug has been fixed in 5.2.x (in project's "5.2.x" branch). The real issue of dependant enums not working in DSLs however remains unresolved. Please also note I suspect the DSL in the example repository should read:- [when]When the vehicle engine is {$engine:ENUM:Vehicle.engineType} and the fuel is {$fuel:ENUM:Vehicle.fuel} = Vehicle(engine=="{$engine}",fuel=="{$fuel}") The main difference being that the variables, $engine and $fuel need to be surrounded with "{" and "}" braces. I also added the quotation marks as DSL's are unaware of data-types and hence Strings should be escaped correctly too. gss_prioritized assigned to manstis GSS prioritizes 'medium'. Customer isn't stuck, but it has been a long time. I'm trying to put the release notes together for this one. Is this the same fix as https://bugzilla.redhat.com/show_bug.cgi?id=724802 If not, please let me know how this was fixed (bullet point is fine). thanks Lee Hi Lee, it was the same problem as #724802 but on a different screen and requiring a different fix. The fix for this one was to change the code to use a different overload of SuggestionCompletionEngine.getEnums() with supporting changes (to use the different overload) in DSLSentenceWidget. Cheers, Mike Thanks Mike 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: https://bugzilla.redhat.com/show_bug.cgi?id=724529 Using dependent enumerations in the same DSL sentence was triggering the java.lang.IndexOutOfBoundException exception. An overloaded method was created to handle dependent enumerations in the same DSL sentence, and this exception no longer occurs. *** Bug 734788 has been marked as a duplicate of this bug. *** 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,3 +1 @@ -https://bugzilla.redhat.com/show_bug.cgi?id=724529 - Using dependent enumerations in the same DSL sentence was triggering the java.lang.IndexOutOfBoundException exception. An overloaded method was created to handle dependent enumerations in the same DSL sentence, and this exception no longer occurs. Raman Gupta <raman.gupta> made a comment on jira GUVNOR-1106 But For Database Query like ENUMERATION :: 'Upc.bundleNames' : (new com.upc.ruleUtility.BundleConstraints()).getInactiveBundleList() 'Upc.Products[bundleNames]' : '(new com.upc.ruleUtility.UPCService()).getBundleAssociatedProductList("@{bundleNames}")' And DSL:: Constraints {BundleList1:ENUM:Upc.bundleNames} and Associated Products {ProductList:ENUM:Upc.Products} = productSet.add("{ProductList}"); issues 1- Dependent drop-down is refreshing with every save and showing first value from the list even if i am selecting 3rd or 4th value. 2- View Source in showing blank for dependent drop down like productSet.add(" "); |