Bug 1043395

Summary: Invalid rules in jboss-bpm-example (Big App) - can't be opened/validated in Guider Rule Editor
Product: [Retired] JBoss BPMS Platform 6 Reporter: Jan Hrcek <jhrcek>
Component: Business CentralAssignee: Toni Rikkola <trikkola>
Status: CLOSED CURRENTRELEASE QA Contact: Jan Hrcek <jhrcek>
Severity: medium Docs Contact:
Priority: high    
Version: 6.0.0CC: kverlaen, rzhang, trikkola
Target Milestone: CR1   
Target Release: 6.0.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-06 20:13:39 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: 1040037    
Bug Blocks: 1033590    

Description Jan Hrcek 2013-12-16 08:26:13 UTC
Description of problem:
The guided rule definitions, that are part of jboss-bpm-example (Big App) should be reviewed. It should be possible to open each of them in Guider Rule Editor (GRE) and also to validate them successfully. However that is not the case. Currently there are the following issues:


1. Jumbo Mortgage - possible to open, but does not validate in GRE.
seems like the statement is not parsed correctly by the editor: application.setApr( application.getApr() + 0.5 );
--> We get the error:

Unable to Analyse Expression System.out.println("Executed Rule: " + drools.getRule().getName() ); application.setApr( );: [Error: unable to resolve method using strict-mode: com.redhat.bpms.examples.mortgage.Application.setApr()] [Near : {... application.setApr( ); ....}] ^ [Line: 3, Column: 0]


2. Rules 'Low down payment before appraisal' and 'Low down payment based on appaisal' do not even open in the editor

3. Rule 'Validate down payment' - rule is not parset correctly by GRE as you can see by checking the source tab. I believe it is caused by the syntax:
 Application( downPayment < 0  || > property.price ) which based on latest info from engineering might no longer be supported.

4. Rule 'Validate SSN' - same issue as in 3 (rule not parsed by GRE editor)


Version-Release number of selected component (if applicable):
BPMS 6.0.0 ER5

How reproducible:
Always

Steps to Reproduce:
1. Install the jboss-bpm-example (Big App)
2. In project explorer navigate to MortgageDemo application and try to open each of the guider rules and try to validate each of them

Actual results:
See details above -
1 rules does not validate (seems like it's not parsed correctly)
2 rules cannot be opened
2 rules are parsed incorrectly - they are not fully read in the G.R.Editor (recommendation do not use shorthand syntax for comparions)

Expected results:
It should be possible to open all rules and all of them should pass validation.

Comment 1 Kris Verlaenen 2013-12-17 02:36:27 UTC
Michael, could you assign this to someone?

Comment 2 manstis 2013-12-17 09:31:59 UTC
Sorry Toni, could you have a look please (it's possibly covered by one of the other Guided Rule Editor BZs)?

Comment 3 Toni Rikkola 2013-12-17 18:15:08 UTC
Unit test for the Jumbo Mortgage
https://github.com/droolsjbpm/drools/commit/c545fce01

Comment 4 Toni Rikkola 2013-12-17 18:37:08 UTC
Unit test for Validate down payment
https://github.com/droolsjbpm/drools/commit/cacb2fd6f

Comment 5 Toni Rikkola 2013-12-18 08:04:28 UTC
Giving this to Mario while he fixes the tests. The tests should fix everything except the field > 10 || < 1 issue. That must be just an issue with the example or possibly with an import tool that the rules were imported with.

Comment 6 Mario Fusco 2013-12-18 10:33:36 UTC
I fixed the drl unmarshalling issue related with the recognition of free form expression in rhs. Reassigning it to Toni.

Comment 7 Ryan Zhang 2014-01-07 09:36:05 UTC
*** Bug 1040037 has been marked as a duplicate of this bug. ***

Comment 8 Jan Hrcek 2014-01-09 13:44:42 UTC
As mentioned in Comment 5, the rules 'Validate down payment' and  'Validate SSN' will need to be updated in the BigApp repository to no longer use the abbreviated syntax, so that they can be correctly loaded by Guided Rule Editor.

Comment 10 Jan Hrcek 2014-01-22 06:35:22 UTC
Ok, verified with BPMS 6.0.0 CR1