Bug 1052313

Summary: Restrictions on Number that is result of 'accumulate' CE are not shown in GRE when the rule is reopened
Product: [Retired] JBoss BRMS Platform 6 Reporter: Jiri Locker <jlocker>
Component: Business CentralAssignee: Toni Rikkola <trikkola>
Status: CLOSED CURRENTRELEASE QA Contact: Jiri Locker <jlocker>
Severity: high Docs Contact:
Priority: high    
Version: 6.0.0CC: etirelli, trikkola, vigoyal
Target Milestone: ER1   
Target Release: 6.0.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Known Issue
Doc Text:
Cause: Guided Rule editor is not able to recognize certain rule language features. Consequence: When a Guided Rule file containing restrictions on the result of accumulate conditional element is opened in Guided Rule editor, these restrictions are not displayed. Workaround (if any): Change the Guided Rule type to DRL by changing its file extension from 'rdrl' to 'drl'. The rule will open in text editor which displays the rule source correctly. The file extension renaming has to be done outside Business Central graphical UI, using GIT. Result:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-06 19:57:12 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 Jiri Locker 2014-01-13 15:45:43 UTC
Description of problem:
Save and close a Guided rule with this fragment:
> $total : Number( intValue > 0 ) from accumulate ( Applicant( age < 30 ), count() )

When it is reopened it looks like
> Number( ) from accumulate ( Applicant( age < 30 ), count() )

Variable binding and field restrictions are gone.

Version-Release number of selected component (if applicable):
ER7

How reproducible:
-

Steps to Reproduce:
See description.

Actual results:
GRE doesn't recognize parts of the DRL source.

Expected results:
After reopening the rule should look exactly the same as it was saved.

Additional info:

Comment 1 Toni Rikkola 2014-01-27 10:46:27 UTC
Test in master: https://github.com/droolsjbpm/drools/commit/619b14877

Comment 2 Mario Fusco 2014-01-27 17:01:34 UTC
Fixed by https://github.com/droolsjbpm/drools/commit/5b650c7ac

Comment 3 Mario Fusco 2014-01-27 17:09:14 UTC
I fixed the drl unmarshalling. Reassigning to Toni to check if also the editor is now ok.

Comment 4 Toni Rikkola 2014-01-29 09:39:56 UTC
Looks like there was actually two bugs here. First one, no constraints shown for Number, is fixed.

Second is that the variable for Number is not picked up. Here is the test for it.
https://github.com/droolsjbpm/drools/commit/5a38cb402

Comment 5 Mario Fusco 2014-01-29 11:09:03 UTC
Fixed by https://github.com/droolsjbpm/drools/commit/21dd2b838

Reassigning to Toni for a further check.

Comment 6 Toni Rikkola 2014-01-29 11:41:02 UTC
Commits for 6.0.x:
https://github.com/droolsjbpm/drools/compare/7376025...227ac58