Bug 1275341 - Jcr2vfs migration tool swaps DRL declared fact's package name and class name
Summary: Jcr2vfs migration tool swaps DRL declared fact's package name and class name
Keywords:
Status: CLOSED EOL
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: Migration Tool
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
urgent
urgent
Target Milestone: ER5
: 6.2.0
Assignee: Walter Medvedeo
QA Contact: Marek Winkler
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-10-26 14:42 UTC by Marek Winkler
Modified: 2020-03-27 19:03 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-27 19:03:23 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Marek Winkler 2015-10-26 14:42:44 UTC
Description of problem:

When migrating DRL assets declaring facts, Jcr2vfs migration tool imports assets into VFS repository in such a way, that the package name and class name of the asset are swapped. For instance, the class mortgages.Applicant is migrated as follows (part of VFS repo dump):

<assetWithHistory>
  ...
  <relativePath>mortgages/src/main/resources/mortgages/mortgages.java</relativePath>
  <source>package Applicant;

/**
 * This class was automatically generated by the data modeler tool.
 */

public class mortgages implements java.io.Serializable {
...

I have (hopefully) tracked the breaking change to the commit [1] - look for lines such as the highlighted one - a new instance of DataObjectImpl is created, but the arguments are swapped, please see [2]. There are several occurences of this change.

[1] https://github.com/droolsjbpm/drools-wb/commit/98f8e709f28595ffcec2ea992ffb95c7e81f19be#diff-3586a1f931677591d16849a6a19781b0R100

[2] https://github.com/droolsjbpm/kie-wb-common/blob/master/kie-wb-common-services/kie-wb-common-data-modeller-core/src/main/java/org/kie/workbench/common/services/datamodeller/core/impl/DataObjectImpl.java#L35

Version-Release number of selected component (if applicable):
BRMS 6.2.0 ER4

How reproducible:
always

Steps to Reproduce:
1. Migrate a repository containing a DRL asset declaring a fact

Actual results:
Asset is imported with package name and class name swapped.

Expected results:
Asset is imported with correct package name and class name.

Comment 2 Walter Medvedeo 2015-10-27 15:01:26 UTC
The following solves the issue:

master: http://github.com/droolsjbpm/drools-wb/commit/17ce25c43

6.3.x: http://github.com/droolsjbpm/drools-wb/commit/402d1f445

Comment 3 Marek Winkler 2015-11-04 16:58:19 UTC
Verified in BRMS 6.2.0 ER5.


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