Bug 1022944 - session-migration: NPE in SubTaskDecorator.checkSubTaskStrategies as Task.subTaskStrategy is null.
Summary: session-migration: NPE in SubTaskDecorator.checkSubTaskStrategies as Task.sub...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss BPMS Platform 6
Classification: Retired
Component: jBPM Core
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: ER5
: 6.0.0
Assignee: Maciej Swiderski
QA Contact: Marek Baluch
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-10-24 10:20 UTC by Marek Baluch
Modified: 2014-08-06 20:12 UTC (History)
0 users

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2014-08-06 20:12:39 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Marek Baluch 2013-10-24 10:20:38 UTC
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.

e.g.
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 10:22:12 UTC
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 14:59:33 UTC
fixed to ensure the sub task strategy is checked before it's used

jbpm
master:
https://github.com/droolsjbpm/jbpm/commit/23672ee22a94ffdaed1651abb4eb1ba22cc7a0aa

6.0.x
https://github.com/droolsjbpm/jbpm/commit/ba1f9b87d6821d5f9fb71c42e6fe97d1e4082221

Comment 3 Marek Baluch 2013-12-02 11:54:31 UTC
Verified on ER5.


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