Bug 728168
Summary: | Problems when writing rhs in Rule API | ||
---|---|---|---|
Product: | [JBoss] JBoss Enterprise BRMS Platform 5 | Reporter: | Tomas Schlosser <tschloss> |
Component: | BRE (Expert, Fusion) | Assignee: | Nobody <nobody> |
Status: | CLOSED UPSTREAM | QA Contact: | |
Severity: | high | Docs Contact: | |
Priority: | medium | ||
Version: | BRMS 5.2.0-ER1 | CC: | mproctor |
Target Milestone: | --- | ||
Target Release: | BRMS 5.3.0.GA | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2025-02-10 03:14:06 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: |
Description
Tomas Schlosser
2011-08-04 09:12:36 UTC
Fixed. Thanks. Edson Tirelli <ed.tirelli> updated the status of jira JBRULES-3355 to Resolved Edson Tirelli <ed.tirelli> updated the status of jira JBRULES-3355 to Closed It is fixed now, thank you Edson The problem with missing rhs() was resolved, but the problem with missing line end remains. It is still impossible to use .rhs("#consequence"). Tomáš Schlosser <tschloss> updated the status of jira JBRULES-3355 to Reopened Tomáš Schlosser <tschloss> made a comment on jira JBRULES-3355 The problem with missing rhs() was resolved, but the problem with missing line end remains. It is still impossible to use .rhs("#consequence"). Edson Tirelli <ed.tirelli> made a comment on jira JBRULES-3355 Tomas, isn't this a different problem? # is a parser syntax sugar for comments (//) that is being deprecated. If one uses # in the rule API, it will skip the parser and the # will not be converted into //, causing a compilation error. But the error should be due to # not being a valid character in java, not because of the concatenated "end" anymore. Can you please double check the error message you are getting and let me know? Tomas, I just tested it myself and my previous comment holds. The problem you see with the use of # is a different problem. The error message says it: "no viable alternative at character '#'" The issue here is that when using the API, people are required to use valid java/mvel code blocks as the DRL parser is not used to deal with syntax sugar like #. On top of that, we are deprecating # as that character might be required in the future to support other features and we don't want it to clash. So I don't think we should "fix" this. Instead, documenting it as deprecated as a whole and stating that when using the API, valid java/MVEL code has to be used is probably a better solution. What do you think? OK, I have tried it and '#' is not working and '//' is. Could you please add to documentation information that '#' comments are deprecated. Thank you! I updated the documentation to state that the use of # is deprecated and added a javadoc comment to the API explicitly warning that the use of # is not supported in the consequence. https://github.com/droolsjbpm/drools/commit/0df9873f42c295301cbdbb8bbf20be1e48c61ab8 Edson Tirelli <ed.tirelli> updated the status of jira JBRULES-3355 to Resolved Edson Tirelli <ed.tirelli> updated the status of jira JBRULES-3355 to Closed Please verify the issue on 5.3 ER4. The problem is gone and documentation will be reviewed. I've added a note to the release notes deprecated features section that: Using the '#' character for single line comments has been deprecated. Users should use '//' for single line comments. Comment section of the docs updated to reflect this change. The docs should be live on the internal stage within the hour: http://documentation-stage.bne.redhat.com/docs/en-US/JBoss_Enterprise_BRMS_Platform/5/html/JBoss_Rules_5_Reference_Guide/sect-comments.html 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: Including comments on the RHS of a rule when using the Rule API resulted in a compiler error. 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 @@ -Including comments on the RHS of a rule when using the Rule API resulted in a compiler error.+Including comments on the RHS of a rule when using the Rule API, resulted in a compiler error. Deleted Technical Notes Contents. Old Contents: Including comments on the RHS of a rule when using the Rule API, resulted in a compiler error. I've removed the release notes flag to prevent this issue from showing up in the resolved section of the release notes as it has been added to the deprecated section of the release notes. This product has been discontinued or is no longer tracked in Red Hat Bugzilla. |