Bug 724767 (BRMS-605)
Summary: | Compilation of rules should fail when is not used quotes in a String attribute | ||
---|---|---|---|
Product: | [JBoss] JBoss Enterprise BRMS Platform 5 | Reporter: | Alessandro Lazarotti <alazarot> |
Component: | BRE (Expert, Fusion) | Assignee: | Mario Fusco <mfusco> |
Status: | VERIFIED --- | QA Contact: | |
Severity: | unspecified | Docs Contact: | |
Priority: | high | ||
Version: | 5.1.0 GA | CC: | mfusco, mproctor, rwagner |
Target Milestone: | --- | ||
Target Release: | BRMS 5.3.0.GA | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
URL: | http://jira.jboss.org/jira/browse/BRMS-605 | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: |
Compilation of rules should fail when quotes are not used for string attributes. This did not happen when numerical values were used as string attributes without quotes, and the rules using numerical values were never matched.
|
Story Points: | --- |
Clone Of: | Environment: | ||
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: |
Description
Alessandro Lazarotti
2011-06-13 19:44:03 UTC
Link: Added: This issue relates to JBRULES-3080 Customer ticket for this BZ is still open. High Priority is justified. Please set the help desk ticket reference in the correct field in BZ using the SalesForce functionality. Thanks! Hi, we don't have a "Target Release" yet. When is it supposed to be fixed? There is some confusion going on here. When a constraint uses operations between different types of data, the engine will try to coerce them into compatible types. So in the state example: f : Fact( stringAttribute == 12 ) The engine identifies the incompatible (but valid) types, and try to coerce the constant 12 (number) into a compatible type to compare to the attribute. So, the engine automatically converts 12 into "12" and then compare to the string attribute. This is the expected behavior. On the other example though: f : Fact( stringAttribute == ab ) Unless ab is a previously declared variable, it is not a valid type, so a compilation error is raised and no coercion is attempted. This is not a bug. "So,the engine automatically converts 12 into "12"" - yes Edson, it is the point. It does not convert 12 to "12" (maybe it is converting to some char code). So the rule: f : Fact( stringAttribute == 12 ) ... never is fired if the fact has the property as really "12" Sorry Alessandro, I misunderstood the description of the problem. Indeed I just tested 5.3.x and it is not firing the rule, so it is a bug. Asking Mario to take a look. Mario Fusco <mario.fusco> updated the status of jira JBRULES-3080 to Resolved I just fixed it on the 5.3.x. It was already fixed (as a side effect of a new feature) on the master. Update status to ON_QA. Please verify them against ER6. This issue is fixed in ER, thank you. 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: Compilation of rules should fail when quotes are not used for string attributes. This did not happen when numerical values were used as string attributes without quotes, and the rules using numerical values were never matched. |