Bug 858222 - Designer: Validation failed if import BPMN2 process into wrong package
Summary: Designer: Validation failed if import BPMN2 process into wrong package
Keywords:
Status: VERIFIED
Alias: None
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: BRM (Guvnor)
Version: BRMS 5.3.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ER2
: BRMS 5.3.1 GA
Assignee: manstis
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-09-18 10:56 UTC by Sona Mala
Modified: 2023-05-01 08:28 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


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

Description Sona Mala 2012-09-18 10:56:37 UTC
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 07:58:02 UTC
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 22:46:45 UTC
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.

Thanks.

Comment 3 Tihomir Surdilovic 2012-09-26 04:16:56 UTC
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 13:33:33 UTC
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.