Bug 1008198

Summary: Jcr2vfs: functions are not correctly migrated
Product: [Retired] JBoss BRMS Platform 6 Reporter: Petr Široký <psiroky>
Component: Business CentralAssignee: Petr Široký <psiroky>
Status: CLOSED CURRENTRELEASE QA Contact: Petr Široký <psiroky>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 6.0.0   
Target Milestone: ER4   
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:49 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:

Description Petr Široký 2013-09-15 18:26:28 UTC
Description of problem:
Functions saved in *.function files are not correctly migrated. The header "function <filename>" is prepended and word "end" appended to migrated files. For example:

    function String getStringFunction(String arg) {
        return "some string";
    }

gets migrated to:

    function 'Function'

    function String getStringFunction(String arg) {
       return "some string";
    }

    end

Same migration steps as for DRL are used which is wrong. Functions should be migrated as is, without any words prepending/appending.


Version-Release number of selected component (if applicable):
Community 6.0.0-SNAPSHOT

Comment 1 Petr Široký 2013-09-15 20:26:54 UTC
Partially fixed, plain text migrater is now used for functions.
https://github.com/droolsjbpm/drools-wb/commit/fa5e0010c8b79b9e830c084ce08175e2b96a19f6

However after the migration, the file with function has .drl extension. In Guvnor 5 the extension was .function. Need to find out if that was changed in 6 or not (and if not fix it).

Comment 2 Petr Široký 2013-09-19 16:48:16 UTC
The function should indeed be saved in .drl files, so marking this as resolved.

Comment 3 Petr Široký 2013-12-06 10:16:56 UTC
Migration tool in ER5 is broken, see https://bugzilla.redhat.com/show_bug.cgi?id=1034931 . I will try to verify again in ER6. Please note that the issue is fixed in community 6.0.0.Final, so I expect it to be fixed in next prod. build (ER6).

Comment 4 Petr Široký 2014-01-14 10:39:19 UTC
Verified fixed in 6.0.0-ER7.