Bug 1022944 - session-migration: NPE in SubTaskDecorator.checkSubTaskStrategies as Task.subTaskStrategy is null.
session-migration: NPE in SubTaskDecorator.checkSubTaskStrategies as Task.sub...
Product: JBoss BPMS Platform 6
Classification: JBoss
Component: jBPM Core (Show other bugs)
Unspecified Unspecified
medium Severity high
: ER5
: 6.0.0
Assigned To: Maciej Swiderski
Marek Baluch
Depends On:
  Show dependency treegraph
Reported: 2013-10-24 06:20 EDT by Marek Baluch
Modified: 2014-08-06 16:12 EDT (History)
0 users

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

Attachments (Terms of Use)

  None (edit)
Description Marek Baluch 2013-10-24 06:20:38 EDT
Description of problem:
When I try to complete a task I get a NPE with the following stack:

Exception in thread "main" java.lang.NullPointerException
	at org.jbpm.services.task.subtask.SubTaskDecorator.checkSubTaskStrategies(SubTaskDecorator.java:196)
	at org.jbpm.services.task.subtask.SubTaskDecorator.complete(SubTaskDecorator.java:101)
	at org.jbpm.services.task.deadlines.DeadlinesDecorator.complete(DeadlinesDecorator.java:113)
	at org.jbpm.services.task.impl.TaskServiceEntryPointImpl.complete(TaskServiceEntryPointImpl.java:253)
	at org.jboss.qa.bpms.jbpm.LoadSessionTest.humanTaskWithTaskServiceTest(LoadSessionTest.java:257)
	at org.jboss.qa.bpms.jbpm.LoadSessionTest.main(LoadSessionTest.java:310)

The issue is caused by the update of tables from jBPM 5 to 6. The 'subTaskStrategy' column will be 'null' for all tasks.

mysql> select subTaskStrategy from Task;
| subTaskStrategy |
| NULL            |
1 row in set (0.00 sec)

How to reproduce:
1) Execute a process with a human task in 5.
2) Restore it in 6 and complete the task.

The 'StoreSessionTest.humanTaskWithTaskServiceTest' amd 'LoadSessionTest.humanTaskWithTaskServiceTest' in http://git.app.eng.bos.redhat.com/jbossqe/brms.git/tree/test-jbpm-session-migration can be used to reproduce the issue.
Comment 1 Marek Baluch 2013-10-24 06:22:12 EDT
I set the severity to 'High' because I believe that many customers will use the migration feature to move their processes from 5 to 6. If the feature does not work then their operation will be impacted in great extent.
Comment 2 Maciej Swiderski 2013-10-29 10:59:33 EDT
fixed to ensure the sub task strategy is checked before it's used


Comment 3 Marek Baluch 2013-12-02 06:54:31 EST
Verified on ER5.

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