Bug 1078241

Summary: jBPM Designer does not create custom tasks properly
Product: [Retired] JBoss BPMS Platform 6 Reporter: Radovan Synek <rsynek>
Component: jBPM DesignerAssignee: Tihomir Surdilovic <tsurdilo>
Status: CLOSED CURRENTRELEASE QA Contact: Radovan Synek <rsynek>
Severity: urgent Docs Contact:
Priority: high    
Version: 6.0.1CC: etirelli, kverlaen, rrajasek
Target Milestone: CR1   
Target Release: 6.0.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-06 20:02:30 UTC 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
screenshot
none
work item definition none

Description Radovan Synek 2014-03-19 13:07:05 UTC
Created attachment 876337 [details]
screenshot

Custom task defined by new work item definition has been created in jBPM Designer as some unknown task with TaskType="My" which is a substring of the work item's name. It does not contain any Data I/O nor Assignments, it does not show the icon defined in WID file and the process definition is broken so badly, that even bpmn2 source cannot be displayed.

Clicking on View node source leads to error:
No enum constant org.jbpm.designer.bpmn2.impl.Bpmn20Stencil.Task_My


Steps to Reproduce:
1. upload an icon
2. create a new work item definition, change the icon and save it
3. create a new bpmn2 process
4. use the new service task, see it's properties
5. try to watch the bpmn2 source.


Moreover, this corrupted process definition can be saved without any problem - at least this jBPM Designer says. After reopening the definition, there is only a start node (see the screenshot for a process definition before saving).
Attaching also my work item definition file.

Comment 1 Radovan Synek 2014-03-19 13:08:50 UTC
Created attachment 876338 [details]
work item definition

Comment 2 Tihomir Surdilovic 2014-03-19 14:27:11 UTC
The problem here is that you end the workitem name with "Task" (capital T). Designer uses the value Task internally for a lot of things like data mappings etc. Ending the wid name with Task breaks some parsing in Designer which causes this issue. 

If you rename to Mytask (lowercase t) things work as espected.

I will remove this limitation in Designer. Nice catch!

Comment 3 Tihomir Surdilovic 2014-03-19 16:11:11 UTC
Fixed in master and 6.0.x:

master: https://github.com/droolsjbpm/jbpm-designer/commit/d1c222fea (d1c222feaec2ea467e1909b3c9dd0f2faa1f78af)

6.0.x: https://github.com/droolsjbpm/jbpm-designer/commit/e4d061a08 (e4d061a08eeb444e17b052a01df6e8f2327c8770)

Comment 4 Radovan Synek 2014-03-19 16:41:09 UTC
Tiho,

better to check also whether the name of the task starts with "wp-", because in that case, you cannot drag the task from Object library to canvas.

Comment 5 Tihomir Surdilovic 2014-03-19 19:16:44 UTC
Added same fix for wp- as requested:


master: https://github.com/droolsjbpm/jbpm-designer/commit/55573848393b58f48b54bb65e7c2d5c2599703e6  ( 55573848393b58f48b54bb65e7c2d5c2599703e6)


6.0.x: https://github.com/droolsjbpm/jbpm-designer/commit/cf94e32d744b4d8306776c895922a13866528d7f  ( cf94e32d744b4d8306776c895922a13866528d7f )

Comment 6 Edson Tirelli 2014-03-19 19:53:14 UTC
Cherry-picked into 6.0.1.CR1:

commit 012c251f8e2cea34d2db7021e52a63799fc8bff2
Author: Tihomir Surdilovic <tsurdilo>
Date:   Wed Mar 19 15:14:16 2014 -0400

    BZ 1078241 - jBPM Designer does not create custom tasks properly
    (cherry picked from commit cf94e32d744b4d8306776c895922a13866528d7f)

commit ee3f2ffb31e147ab9792b374bf558fc47df6f2ec
Author: Tihomir Surdilovic <tsurdilo>
Date:   Wed Mar 19 12:07:51 2014 -0400

    BZ 1078241 - jBPM Designer does not create custom tasks properly
    (cherry picked from commit e4d061a08eeb444e17b052a01df6e8f2327c8770)

Comment 7 Radovan Synek 2014-03-24 10:12:07 UTC
Verified with BPMS-6.0.1.CR1