Description of problem: Basically the same problem as bug 975922 and bug 1000464 but affecting multirestrictions. Version-Release number of selected component (if applicable): ER3 How reproducible: - Steps to Reproduce: 1. create fact pattern similar to Person( age == 10 || > 20 ) 2. reopen the rule Actual results: Operator select box is reset. Expected results: GRE should reopen the rule as it was saved. Additional info: Affects all kinds of operators (==, <, <==, etc.), contains, excludes, matches soundslike, ...
The restriction syntax is deprecated and we definitively don't want to support that in the UI. If we are having problems importing existing DRLs that use that syntax, we can use the expression rewrite we have in core to properly convert the deprecated syntax into the extended syntax. I don't remember if in 5 we supported such syntax, but if we did, it would be good to consider disabling it in 6. This restriction syntax causes clashes with free form expressions that are much more flexible and the best syntax forward.
Edson, "If we are having problems importing existing DRLs that use that syntax, we can use the expression rewrite we have in core to properly convert the deprecated syntax into the extended syntax." Could you please point me to what/where this is? Thanks, Mike
Can't reproduce anymore. I could yesterday. Must have been fixed as a side effect for some other change. Unfortunately I can't figure out what.
More details. The editor no longer saves rules like this: Person( age == 10 || > 20 ) It does this: Person( age == 10 || age == > 20 )
(In reply to Toni Rikkola from comment #4) > More details. > > The editor no longer saves rules like this: > Person( age == 10 || > 20 ) > > It does this: > Person( age == 10 || age == > 20 ) Not true for ER7. The rule is still saved as: Applicant( name == "a" || == "b" ) Moreover, such rule now cannot be reopened at all. I get an error dialog with message "Unable to complete your request. The following exception occurred: null.". No stack trace in server log.
Ok. I found the button next to the constraint that still allowed me to do Person( age == 10 || > 20 ). I removed the button. Since if the button is used and the rule is saved and reopened the rule will open looking different. The constraints are split into their own lines. Looking like this: Person( age == 10 || age > 20 ) master: https://github.com/droolsjbpm/drools-wb/commit/c3fc6286f 6.0.x: https://github.com/droolsjbpm/drools-wb/commit/4ad8f1b92
The button allowing to add "more options" to a field was removed and now it is not possible to create multirestrictions using the joint operators (&& !=, || <, etc.). However rules using this syntax may have been created in product versions 6.0.0 and 6.0.1 or imported from 5.x repositories. These rules will be still displayed incorrectly when open in Guided Rule editor. Optimal solution would be to automatically convert this syntax to the new replacement when the rule is opened...