Bug 999567

Summary: Jcr2vfs migration tool fails to correctly migrate guided rules that use category feature to inherit from other rules
Product: [Retired] JBoss BRMS Platform 6 Reporter: Petr Široký <psiroky>
Component: Business CentralAssignee: Neus Miras <nmirasch>
Status: CLOSED CURRENTRELEASE QA Contact: Petr Široký <psiroky>
Severity: high Docs Contact:
Priority: medium    
Version: 6.0.0CC: etirelli, pzapataf
Target Milestone: ER6   
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:19:55 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:
Attachments:
Description Flags
Repository that can easily reproduce the issue none

Description Petr Široký 2013-08-21 15:01:13 UTC
Description of problem:
The guided rules in guvnor 5.x are not correctly migrated when they use the category feature to inherit from other rules. The migrated rules does not extend the rules they should according to category setup in 5.x.

For example when you have a BRL 'rule A' in category 'someCategory':
    rule A
      when
        Person()
      then
    end

and then 'rule B':
    rule B
      when
        Driver()
      then
    end

and in Guvnor 5.x you setup (in package edit view) that all rules in that package and in category 'someCategory' (that includes rule A) should extend 'rule B'. So in the end the 'rule A' will fire only when there is a Person() fact and also Driver() fact (drive got there from 'rule A'). After the migration I would expect that 'rule A' should have declared (in DRL) that it extends 'rule'.


Version-Release number of selected component (if applicable):
6.0.0-ER1#1


How reproducible:
Always


Steps to Reproduce:
1. Download and unzip the attached repo.
2. Run the migration tool with the above repo as input.
3. Look at source of asset 'guvnor-jcr2vfs-migration/org.guvnor.example2/src/main/resources/BRL in category.rdrl'


Actual results:
The rule does _not_ extend 'rule2'.


Expected results:
The rule should extend 'rule2'.

Comment 1 Petr Široký 2013-08-21 15:02:46 UTC
Created attachment 788914 [details]
Repository that can easily reproduce the issue

Comment 5 Neus Miras 2013-11-22 15:11:16 UTC
Now, the extend expression is added when the asset belongs to a category that has a CateroryRule defined at package level.


Commit:
6.0.x
https://github.com/droolsjbpm/drools-wb/commit/bcd10d8427e23c4c9edda48d91b4e5aba03b7070

Comment 6 Petr Široký 2014-01-14 11:23:50 UTC
Verified fixed in 6.0.0-ER7.