Bug 1230987 - Process with space in the name breaks the Form Editor
Summary: Process with space in the name breaks the Form Editor
Keywords:
Status: CLOSED EOL
Alias: None
Product: JBoss BPMS Platform 6
Classification: Retired
Component: Business Central
Version: 6.1.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: DR1
: 6.2.0
Assignee: Marco Rietveld
QA Contact: Lukáš Petrovický
URL:
Whiteboard:
Depends On:
Blocks: 1231365
TreeView+ depends on / blocked
 
Reported: 2015-06-12 00:47 UTC by William Antônio
Modified: 2020-03-27 20:12 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
: 1231365 (view as bug list)
Environment:
Last Closed: 2020-03-27 20:12:50 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description William Antônio 2015-06-12 00:47:18 UTC
Description of problem:

When we have a project with space in the name, we are not able to edit the process form.

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


How reproducible:


Steps to Reproduce:
1. In a clean BPM Suite installation, create a new project with space in the name, let's say "My new project"
2. Create a new process in it, let's say "myProc"
3. Open this process using the web designer and go to the form button and choose the option to edit the process form and then click on the first option which is use the visual editor.

Actual results:

Error:

Unable to complete your request. The following exception occurred: Illegal character in path at index 31: default://master@repository1/My New Project/src/main/resources/MyNewProject.myProc-taskform.form.


Expected results:

No error.

Additional info:

Comment 2 William Antônio 2015-06-13 01:26:07 UTC
The error is printed from class JbpmPreprocessingUnit at line 203:

try {
    evaluateWorkDefinitions(workDefinitions, entry, asset.getAssetLocation(), repository, profile);
} catch(Exception e) {
    _logger.error("Unable to parse a workitem definition: " + e.getMessage());
}

With further debugging I found that the actually cause if the error is an URI parsing:


java.net.URISyntaxException: Illegal character in path at index 33: default://master@repository1/With Space/src/main/resources/defaultemailicon.gif

It is thrown when it is checked if the icon exists (line 362 of class JbpmPreprocessingUnit):

----
String absoluteIcon = createAbsoluteIconPath(assetLocation, icon);
if (repository.assetExists(absoluteIcon)) {
    icon = absoluteIcon;
    iconFound = true;
}
----


The method only receives a String so it probably fails with all Strings that contains spaces. The solution would be format the String accordingly, but I am not sure if using URI encoding is the proper way. Notice that simply replace the spaces will probably result in problems if the project has special characters.

Should we document that projects should not contain space/special characters or format the icon name accordingly?

In any case, I could workaround this issue by replacing the spaces in the name of the project by "%20", but I see that the assetLocation is used in a lot of other places.

I hope this helps.

Comment 3 Jeremy Lindop 2015-06-24 11:04:07 UTC
Fixed - see clone for details
https://bugzilla.redhat.com/show_bug.cgi?id=1231365#c3

Comment 4 Martin Zilak 2015-09-24 10:15:14 UTC
I followed the steps to reproduce the problem on 6.2.0.ER and there weren't any problems - Form Editor works fine in a process with a space in it's name, so I consider this verified.


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