Bug 833345

Summary: Designer does not work with Unicode package names
Product: [JBoss] JBoss Enterprise BRMS Platform 5 Reporter: Zuzana Krejčová <zkrejcov>
Component: BRM (Guvnor), jBPM ConsoleAssignee: manstis
Status: MODIFIED --- QA Contact:
Severity: medium Docs Contact:
Priority: unspecified    
Version: unspecifiedCC: kverlaen
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Including unicode characters in package names stops the process designer from being able to load the packages. As such, when creating new processes it is important not to include unicode characters in either the process name or the process ID, as this is not currently supported and will result in unexpected behavior from the process designer.
Story Points: ---
Clone Of: Environment:
Last Closed: Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
exceptions thrown when the Designer has to deal with unicode none

Description Zuzana Krejčová 2012-06-19 09:24:05 UTC
Created attachment 592886 [details]
exceptions thrown when the Designer has to deal with unicode

Description of problem:
Using unicode strings as package names works in Guvnor, but the Designer can't handle any processes created inside those. 
Any new process does not have it's name, ID and package set by the Designer, the Shape Repository on the left shows the minimal perspective with all the right shapes but without the categories (when I switch to full perspective, it looks okay). Process information only has "Unable to retrieve process information." in it.
Creating a simple Start->Script->End definition, adding the process name, ID and package and validating results in "Invalid answer from server." message, process can be saved anyway, package built too.
Server log shows these:
ERROR [org.drools.repository.RulesRepository] (http-127.0.0.1-8080-6) Unable to load a rule package. 
javax.jcr.PathNotFoundException: ÄÅ¡ÄPackage
	at org.apache.jackrabbit.core.NodeImpl$8.perform(NodeImpl.java:2135)
...
WARNING [org.apache.cxf.jaxrs.impl.WebApplicationExceptionMapper] (http-127.0.0.1-8080-6) WebApplicationException has been caught : Unable to load a rule package.
ERROR [org.jbpm.designer.web.server.ServletUtil] (http-127.0.0.1-8080-4) Server returned HTTP response code: 500 for URL: http://localhost:8080/jboss-brms/rest/packages/ěščPackage/assets/
ERROR [org.drools.repository.RulesRepository] (http-127.0.0.1-8080-7) Unable to load a rule package. 
javax.jcr.PathNotFoundException: null
	at org.apache.jackrabbit.core.NodeImpl$8.perform(NodeImpl.java:2135)
...
These errors show (at least) when creating the process, as the Designer loads, and when validating the process.

This was observed with the standalone version.


Version-Release number of selected component (if applicable):
BRMS 5.3 ER9 (though it's surely been there since the bug 739036 was fixed)

Comment 2 Tihomir Surdilovic 2012-08-23 22:59:16 UTC
Done in Designer 2.3.x branch.

Comment 3 Zuzana Krejčová 2012-09-12 12:16:11 UTC
Sorry but still happening. (i) in Designer says the Designer version is 2.2.1.Final. Was the fix picked for that version too?

Comment 4 Tihomir Surdilovic 2012-09-12 12:20:55 UTC
It has not. Seems the build did not pick up the right Designer version?

Comment 5 Zuzana Krejčová 2012-09-14 11:14:34 UTC
Tried once more with the current build, Designer version 2.3.1-DEV, used "žlýOškliváPakážů" as a package name.
It looks like part of the issue was fixed, but there are still problems.

I can now see the process information in the left panel, process package, ID and name are set and show correctly.

The minimal perspective though still shows shapes without their categories - that makes quite a mess in it. Process can be validated without the "Invalid answer from server." message.

I can't get a .png for the process, server log says:
WARNING [JAXRSInInterceptor] No root resource matching request path /jboss-brms/rest/packages/%C5%BEl%C3%BDO%C5%A1kliv%C3%A1Pak%C3%A1%C5%BE%C5%AF/assets/þlýOákliváPakáþï.testProcess-image has been found, Relative Path: /packages/%C5%BEl%C3%BDO%C5%A1kliv%C3%A1Pak%C3%A1%C5%BE%C5%AF/assets/þlýOákliváPakáþï.testProcess-image. Please enable FINE/TRACE log level for more details.

Creating the process in the package in the first place resulted in:
ERROR [RulesRepository] Unable to load a rule package. 
javax.jcr.PathNotFoundException: žlýOškliváPakážů
	at org.apache.jackrabbit.core.NodeImpl$8.perform(NodeImpl.java:2135)
though I could work on the process after the Designer loaded.

Comment 6 Tihomir Surdilovic 2012-09-14 14:47:59 UTC
Yes, this is an issue with Designer using the REST api of Guvnor which currently cannot handle new files added via it that include unicode characters. In this case we need to document that even tho the users asset has unicode characters in it, that the process ID and the process name should NOT include unicode characters. This will solve the above issue.

Thanks.

Comment 7 Zuzana Krejčová 2012-09-19 10:59:09 UTC
Lee, could you please add it to our docs (comment 6)?

(CC Lee)

Comment 8 lcarlon 2012-09-19 11:42:18 UTC
Sure, Zuzana.

Tiho, would adding the follow text/section to the process designer chapter cover the situation? And if so, is this issue present in the community as well? I can submit a pull request if it is.

*Process Designer and Unicode Characters*

When creating new processes it is important not to include unicode characters in either the process name or the process ID, as this is not currently supported and will result in unexpected behavior from the process designer.

Thanks
Lee

Comment 9 Tihomir Surdilovic 2012-10-17 11:01:31 UTC
Hi Lee, I would write:

"....and will result in unexpected behavior from the process designer." -> "...and will result in unexpected behavior when saving and retrieving your process assets".

WDYT?

Comment 10 lcarlon 2012-10-18 23:50:55 UTC
Thanks Tiho,

I've added a note that states:

When creating new processes it is important not to include unicode characters in either the process name or the process ID, as this is not currently supported and will result in unexpected behavior from the process designer when saving and retrieving the process assets.

I'll post a link to the doc stage as soon as the content has been uploaded.

Thanks
Lee

Comment 12 Rajesh Rajasekaran 2012-11-14 13:49:10 UTC
Setting the release flag to - as this issue did not make it into the release. Documentation was done.

Comment 13 lcarlon 2012-11-14 23:34:48 UTC
Release notes text updated (see doc_text field) - the issue will be filed as a known issue in the release notes.

Comment 14 lcarlon 2012-11-14 23:35:27 UTC
Release notes text updated (see doc_text field) - the issue will be filed as a known issue in the release notes.