Bug 999567 - Jcr2vfs migration tool fails to correctly migrate guided rules that use category feature to inherit from other rules
Summary: Jcr2vfs migration tool fails to correctly migrate guided rules that use categ...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: Business Central
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: ER6
: 6.0.0
Assignee: Neus Miras
QA Contact: Petr Široký
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-21 15:01 UTC by Petr Široký
Modified: 2014-08-06 20:19 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-06 20:19:55 UTC
Type: Bug


Attachments (Terms of Use)
Repository that can easily reproduce the issue (431.23 KB, application/zip)
2013-08-21 15:02 UTC, Petr Široký
no flags Details

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.


Note You need to log in before you can comment on or make changes to this bug.