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
Link: Added: This issue incorporates GUVNOR-593
Created attachment 565161 [details] ruleflow.rf to reproduce
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)
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.
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....
Fixed and backported to 5.3.x. I also fixed an identical problem if a package was renamed.
Also fixed for BPMN2 processes that had a similar problem when a package was copied or renamed.
Update status to ON_QA. Please verify them against ER6.
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).
Marked as no release note required as support for .rf has been deprecated.
This product has been discontinued or is no longer tracked in Red Hat Bugzilla.