Bug 858222 - Designer: Validation failed if import BPMN2 process into wrong package
Designer: Validation failed if import BPMN2 process into wrong package
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: BRM (Guvnor) (Show other bugs)
BRMS 5.3.1
Unspecified Unspecified
unspecified Severity unspecified
: ER2
: BRMS 5.3.1 GA
Assigned To: Tihomir Surdilovic
Sona Mala
Depends On:
  Show dependency treegraph
Reported: 2012-09-18 06:56 EDT by Sona Mala
Modified: 2013-10-10 20:12 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Simple BPMN process (2.26 KB, application/octet-stream)
2012-09-18 06:56 EDT, Sona Mala
no flags Details

  None (edit)
Description Sona Mala 2012-09-18 06:56:37 EDT
Created attachment 613970 [details]
Simple BPMN process

Description of problem:
If source code of BPMN2 process contains different package than is asset package then validation failed.

Version-Release number of selected component (if applicable):
BRMS 5.3.1 ER1

How reproducible:
Every time

Steps to Reproduce:
1. Create new package "pkg1"
2. Create new BPMN2 process in package "pkg1"
3. Import BPMN2 process into asset. It is attached.
4. Click on view PNG 
5. Validate
Actual results:
Package name is different in assets metadata and in process metadata.
Validation failed. An error message is "Process package name is not valid".

There exists workaround:
  - change package name in a text editor before you import it.
  - change package name in designer properties view

Expected results:
Automatic conversion of package name from process package to asset package.
Same package name in assets metadata and in process metadata.

Additional info:
Comment 1 manstis 2012-09-19 03:58:02 EDT
org.drools.guvnor.server.contenthandler.BPMN2ProcessHandler.onAttachmentAdded should already update the BPMN2 process's package name. Tiho, would you mind confirming this bug?
Comment 2 Tihomir Surdilovic 2012-09-25 18:46:45 EDT
When importing the BPMN2 from within Designer the package name is not updated. 

Currently users get notified two ways:

1) From visual validation (Process package name is not valid)

2) When building a package (unable to parse xml : Exception class org.drools.RuntimeDroolsException : invalid package name).

We can go two ways here: a) say these two errors shown to user are enough to prompt them to change the package name. b) Have designer "fix" the package name during the import process.

From the bug report the expected outcome is automatic conversion. Will look into that.

Comment 3 Tihomir Surdilovic 2012-09-26 00:16:56 EDT
Fixed in Designe master and 2.3.x prod branch. Designer will now check the package name of the importing bpmn2 and compare it to the package name the user is importing the bpmn2 into. If they don't match, Designer will update the package name to make sure they are the same. Process name is not looked at.
Comment 4 Sona Mala 2012-10-16 09:33:33 EDT
Verified for BRMS 5.3.1 ER3, designer 2.3.1-dev

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