Bug 1136424
| Summary: | Rules using declaration inside the same pattern where the variable is declared are not compiling | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [JBoss] JBoss Enterprise BRMS Platform 5 | Reporter: | Anton Giertli <agiertli> | ||||
| Component: | BRE (Expert, Fusion) | Assignee: | Mario Fusco <mfusco> | ||||
| Status: | CLOSED UPSTREAM | QA Contact: | |||||
| Severity: | unspecified | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | BRMS 5.3.1 | CC: | mfusco | ||||
| Target Milestone: | --- | ||||||
| Target Release: | future | ||||||
| Hardware: | Unspecified | ||||||
| OS: | Unspecified | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | |||||||
| : | 1136433 (view as bug list) | Environment: | |||||
| Last Closed: | 2025-02-10 03:42:55 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: | |||||
| Embargoed: | |||||||
| Bug Depends On: | |||||||
| Bug Blocks: | 1136433 | ||||||
| Attachments: |
|
||||||
|
Description
Anton Giertli
2014-09-02 14:25:13 UTC
(In reply to Anton Giertli from comment #0) > Following construct in rules > g: GenericPojo( g.getItem("ProductType) == "A" || g.getItem("ProductType) == > "B" ) Is this the correct code sample? It has multiple quotation marks missing, which would surely result in parse errors. Further, qualifying getItem() with "g" is not necessary. "this" would work, and most likely just omitting the qualifier entirely. To be honest, I had no idea that qualifying it this way ever worked. Also, in the future, I would appreciate if the bug title could be something more descriptive than "Regression". That's not a bug title, that's bug classification. Lukáš,
the code sample has been written by hand, apparently with typos, sorry for that.
However, the decision table is attached. Just look for the rules which includes g.getItem("ProductType").genericValue() and ||.
Or navigate directly to lines 196,210,231,238 in the XLS file.
I have also changed the BZ title.
I am aware of the workaround you have mentioned - they are included in the initial bug description twice.
The original rule is not promoting best practise - Mario mentioned this too, but the issue is not with the best practise. The issue is that in the
BRMS 5.3.1 < BRMS 5.3.1 RP5 you can compile successfully this construct, and when RP5 is applied you can't.
I believe that the roll up patch should not break backward compatibility.
Anton.
This product has been discontinued or is no longer tracked in Red Hat Bugzilla. |