Bug 801835

Summary: Work Item Definition where the work item name contains spaces breaks designer
Product: [JBoss] JBoss Enterprise BRMS Platform 5 Reporter: Jiri Locker <jlocker>
Component: BRM (Guvnor)Assignee: manstis
Status: VERIFIED --- QA Contact: Jiri Locker <jlocker>
Severity: medium Docs Contact:
Priority: unspecified    
Version: BRMS 5.3.0.GACC: lpetrovi
Target Milestone: ---   
Target Release: BRMS 5.3.0.GA   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
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:
Attachments:
Description Flags
server.log none

Description Jiri Locker 2012-03-09 15:41:27 UTC
Description of problem:
After creating a WID like this in Guvnor

> [
>   [
>     "name" : "My Task",
>     "parameters" : [ ... ],
>     "results" : [ ... ],
>     "displayName" : "My Task",
>     "icon" : "",
>   ]
> ]

designer throws an exception when looking for file

> designer.war/stencilsets/bpmn2.0jbpm/view/activity/workitems/My%20Task.svg

and fails to finish opening any process.


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

How reproducible:
always

Steps to Reproduce:
1. create a new Work Item Definition in Guvnor
2. save it as is, as long as it is pre-filled with a work item named "My Task"
3. create or open any BPMN2 process in the same package
  
Actual results:
Designer fails to load the process. It shows "Please wait while loading..." message forever. java.io.FileNotFoundException is thrown (see server log).

Expected results:
Designer should look for the correct file and not fail if work item definition contains spaces.

Additional info:

Comment 1 Jiri Locker 2012-03-09 15:44:48 UTC
Created attachment 568949 [details]
server.log

Comment 2 Tihomir Surdilovic 2012-03-14 21:37:42 UTC
First made change to Guvnor default wid template to remove the space in the name field value (https://github.com/droolsjbpm/guvnor/commit/08b396b9f33a86c50e5c5e42e74aaa094e5b3e42) - this is in the Guvnor 5.3.x branch. Also updated Designer to remove any spaces in the name if there are any. Also fixed issue with empty icons by introducing a default service node icon which gets placed if no icon value is selected. Designer changes are in master and Designer 2.1.x branch.

Comment 3 Jiri Locker 2012-05-04 15:56:07 UTC
Fix verified in ER6. A small step to make Guvnor+Designer unbreakable :)