Bug 1008583 - Can't complete process / task in the task list
Can't complete process / task in the task list
Product: JBoss BPMS Platform 6
Classification: JBoss
Component: jBPM Core (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ER4
: 6.0.0
Assigned To: Kris Verlaenen
Ivo Bek
Depends On:
  Show dependency treegraph
Reported: 2013-09-16 12:07 EDT by Michael
Modified: 2014-08-06 16:13 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2014-08-06 16:13:19 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
kverlaen: needinfo+

Attachments (Terms of Use)
server.log (12.04 KB, text/x-log)
2013-09-17 10:14 EDT, Pere Fernàndez
no flags Details

  None (edit)
Description Michael 2013-09-16 12:07:29 EDT
Description of problem:

It is not possible to complete a processs / task in the task list. In both cases you get an error.

Version-Release number of selected component (if applicable):
kie-wb-6.0.0-SNAPSHOT-eap-6_1.war from the 6.0.x branch deployed in a JBoss EAP 6.1

How reproducible:

1 Create a project 
2 Create a data Model 
  datamodel_1 = three fields; 1st string, 2nd string, 3rd pointing to           datamodel_2
  datamodel_2 = two fields; 1st string, 2nd string
3 Create business process : start - task 1 (user task) - task 2 - end
4 Define in business process:
  Properties BPMN Diagram: define Variable definition
  Properties of task 1: edit DataInputSet
                        edit DataOutputSet
                        edit Assignments
                        edit actors
                        edit TaskName
5 Validate process
6 Generate all Forms
                        in Form definitions should be two forms 
7 Generate sub form     New Item --> New Form
                        edit ID
                        edit Input ID
                        edit Output ID
                        Type: From Data Model --> datamodel 2
                        Add field by origin (field1 and field2)
8 Adjust already created forms (processID-taskform and TaskName-taskform) and add the sub form

9 GoTo ProjectsScreen

10 Save File

11 Build & Deploy

12 GoTo Process Management / Process Definitions

13 Start a process - fill form

14 GoTo Tasks / Task List

15 Start Process 

16 Complete process: https://gist.github.com/mbiarnes/6582578

17 Complete task: https://gist.github.com/mbiarnes/6582594                                             

Actual results:

Expected results:
It should be possible to complete a process or a task

Additional info:
This was tested in a EAP 6.1 - not yet in a AS 7. If it doesn't work neither in AS7 I will comment it.
Comment 2 Kris Verlaenen 2013-09-16 13:28:36 EDT

Step 16, complete process, do you mean abort process instance?  As you can't complete a process instance directly.  Looking at the stack trace, this seems to be an issue with form modeler, so setting component and default assignee.

Step 17 exception trace seems to be an issue with the process: it's trying to instantiate task2 but it seems it has not type set (hence it doesn't know how to execute it)?  I'll check if we should add this to the process validation.
Comment 3 Kris Verlaenen 2013-09-16 13:37:24 EDT
Adding fix for validating if a TaskName is not empty:
master: http://github.com/droolsjbpm/jbpm/compare/b5311f9...3a945e4
6.0.x: http://github.com/droolsjbpm/jbpm/compare/b531cdd...1218bbd
Comment 4 Michael 2013-09-17 07:08:33 EDT
We saw that this is related to an ending task that is not defined as "user" task and has no data object/forms associated.
If your process is Start-Task1 (user task)-Task2 (user task)-End everything works OK and it is possible to complete a process.

If the process is Start-task1 (user task)-task2 (none)-End it is not possible to complete a process.
Comment 5 Michael 2013-09-17 07:15:08 EDT
it seems to happen always if you don't add a data model / forms / variables to a process and initialize it and progress it.
Comment 6 Pere Fernàndez 2013-09-17 10:14:45 EDT
Created attachment 798835 [details]
Comment 7 Pere Fernàndez 2013-09-17 10:16:24 EDT
This error occurs when an empty task is being executed, a few ways to reproduce it:

1- Define a Data Model Object with one String attribute
2- Define a process with a variable of the defined Data Model Object with two tasks:
  - A human task to modify the process variable
  - An empty task
3- Generate the process forms
4- Build & Deploy
5- Run the process: you will be able to insert data for the process variable before start the process
6- Go to task list and execute "the process task one": you can modify the object data and when you press. After press continue the process crashes.

Another way to reproduce it:
1- Define a Data Model Object with one String attribute
2- Define a process with a variable of the defined Data Model Object with two tasks:
  - A Script task with the code: System.out.println("RUNNING SCRIPT TASK");
  - Empty task
3- Generate the process forms
4- Build & Deploy
5- Run the process: you will be able to insert data for the process variable before start the process. After that if you look at the server.log you will see how the "RUNNING SCRIPT TASK" is printed and how it crashes when try to run the empty task. 
Look at the attachment to see the server log for this sample.
Comment 8 Michael 2013-09-17 11:22:50 EDT
The fix of validating if the TaskName is not empty seems to work, because you can't deploy any more a project/process if the TaskName is empty. But this doesn't preserve that you can't complete a process if a task has no type (user or script or automatic etc.) - if the TaskType is empty.
Comment 9 Kris Verlaenen 2013-09-19 19:16:02 EDT

Executing a process with a task that has no type should not be possible (as we wouldn't know how to execute it anyway, as it has no type).

The additional validation doesn't check if TaskName is empty, but that workItemNode.getWork().getName() is empty.  This is the type of task (for example Service Task or Human Task etc.).  So you should no longer be able to build a process that has no type set.

Have you verified that this is still possible in latest 6.0.x and/or master?

Comment 11 Ivo Bek 2013-10-16 08:56:57 EDT
Verified in BPMS 6.0.0.ER4 that it's not possible to build a project with a process, containing task without any type. The "Problems" panel contains:

  Process 'RepTestProcess' [reproducer.RepTestProcess]: Task node '' [2] has no work name.
Comment 12 Anton Giertli 2014-04-11 06:09:11 EDT

I have added REST Service Task on the palette, after some time, designer just changed it to task with no type so I have hit this issue.

Then I refreshed to designer, and the task type was back to REST.

Nevertheless I am still not able to build the project with the same issue as described in #11.

After deleting the whole node and adding a new one (rest task) build work as expected.

BPM 6.0.1 GA


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