Bug 724409 (BRMS-354) - [GUVNOR-593] copying packages doesn't change rule flow package
Summary: [GUVNOR-593] copying packages doesn't change rule flow package
Keywords:
Status: CLOSED UPSTREAM
Alias: BRMS-354
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: BRM (Guvnor)
Version: 5.0.2
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ER6
: BRMS 5.3.0.GA
Assignee: manstis
QA Contact:
URL: http://jira.jboss.org/jira/browse/BRM...
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-08-12 09:54 UTC by Toshiya Kobayashi
Modified: 2025-02-10 03:13 UTC (History)
2 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2025-02-10 03:13:48 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
ruleflow.rf to reproduce (826 bytes, text/plain)
2012-02-23 02:04 UTC, Toshiya Kobayashi
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker BRMS-354 0 Major Closed [GUVNOR-593] copying packages doesn't change rule flow package 2014-03-14 18:58:08 UTC
Red Hat Issue Tracker GUVNOR-593 0 Major Resolved Rule Flows : Copying packages doesn't change rule flow package 2014-03-14 18:58:08 UTC

Description Toshiya Kobayashi 2010-08-12 09:54:18 UTC
Help Desk Ticket Reference: https://access.redhat.com/issue-tracker/1245373
securitylevel_name: Public

Platform JIRA for [GUVNOR-593] copying packages doesn't change rule flow package

Comment 1 Toshiya Kobayashi 2010-08-12 09:54:50 UTC
Link: Added: This issue incorporates GUVNOR-593


Comment 5 Toshiya Kobayashi 2012-02-23 02:04:09 UTC
Created attachment 565161 [details]
ruleflow.rf to reproduce

Comment 6 Toshiya Kobayashi 2012-02-23 02:05:33 UTC
Sorry for responding late.
I confirmed that this issue still exists in BRMS 5.3.0.ER3. This time, it doesn't throw NPE but "org.drools.RuntimeDroolsException: invalid package name" in building package.
In addition, uploading a ruleflow also has the same issue. It looks like a regression of GUVNOR-229.

Steps to reproduce:

** attached ruleflow.rf is a sample rule flow generated by JBDS. Its package is "com.sample" by default.

- upload ruleflow.rf to "defaultPackage"
- build "defaultPackage"
--> it throws "org.drools.RuntimeDroolsException: invalid package name" (GUVNOR-229)
- create a package "com.sample"
- upload ruleflow.rf to "com.sample"
- build "com.sample"
--> no problem
- copy "com.sample" package as "xxx.yyy"
- build "xxx.yyy"
--> it throws "org.drools.RuntimeDroolsException: invalid package name" (GUVNOR-593)

Comment 7 manstis 2012-04-04 09:44:27 UTC
GUVNOR-229 regression appears to be caused by regressions in jBPM related code.

GUVNOR-593 will depend upon the fix for the GUVNOR-229 regression.

I have asked jBPM team for guidance.

Comment 8 manstis 2012-04-10 13:22:31 UTC
This problem highlights a general problem with deserializing RuleFlowProcesses.

This reported problem:-

- upload ruleflow.rf to "defaultPackage"
- build "defaultPackage"
--> it throws "org.drools.RuntimeDroolsException: invalid package name"
(GUVNOR-229)

is caused by an attempt to cast a List<Process> into a RuleFlowProcess in org.drools.guvnor.server.contenthandler.drools.RuleFlowHandler.onAttachmentAdded. This calls into readProcess(...) that catches the CCE and returns null. Nice.

The problem is that XmlProcessReader.read(..) returns a List<Process> and not a RuleFlowProcess (I am sure this is for a good reason, e.g. RuleFlowProcess is deprecated in favor of Process but the serialization\deserialization mechanism was changed in favor of the new API and not tolerant to legacy models).

Searching Guvnor's code base, this is not the only place this error will occur:-
1) GuvnorAPIServlet
2) BPMN2ProcessHandler
3) RuleFlowHandler

Digging deeper....

Comment 9 manstis 2012-04-11 10:10:48 UTC
Fixed and backported to 5.3.x. 

I also fixed an identical problem if a package was renamed.

Comment 10 manstis 2012-04-12 20:32:45 UTC
Also fixed for BPMN2 processes that had a similar problem when a package was copied or renamed.

Comment 11 Ryan Zhang 2012-04-23 07:36:30 UTC
Update status to ON_QA. Please verify them against ER6.

Comment 12 Sona Mala 2012-05-09 08:09:16 UTC
Verified import of Rule Flow and copy|rename of package which contains this Rule Flow.

Copy|Rename of package, which contains BPMN2 process, is ok but validation of process failed. Description in BZ 816572 (https://bugzilla.redhat.com/show_bug.cgi?id=816572).

Import of BPMN2 process to wrong package causes a validation error (but cause of error is shown and user can change package's name manually).

Comment 13 lcarlon 2012-05-31 05:23:17 UTC
Marked as no release note required as support for .rf has been deprecated.

Comment 17 Red Hat Bugzilla 2025-02-10 03:13:48 UTC
This product has been discontinued or is no longer tracked in Red Hat Bugzilla.


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