Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1082508

Summary: NPE when I use task escalation in my process
Product: [Retired] JBoss BPMS Platform 6 Reporter: Ivo Bek <ibek>
Component: Business CentralAssignee: Maciej Swiderski <mswiders>
Status: CLOSED CURRENTRELEASE QA Contact: Ivo Bek <ibek>
Severity: high Docs Contact:
Priority: high    
Version: 6.0.1CC: kverlaen, rrajasek
Target Milestone: ER3   
Target Release: 6.0.2   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-08-06 19:50:32 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
Task escalation process definition
none
stacktrace none

Description Ivo Bek 2014-03-31 08:17:01 UTC
Created attachment 880596 [details]
Task escalation process definition

Description of problem:

When I start the attached process, I will get a NPE immediately after the start (see the attached stacktrace).

Caused by: java.lang.NullPointerException
	at org.jbpm.services.task.impl.model.DeadlineImpl.hashCode(DeadlineImpl.java:146)

The exception occurs only when I use another DB than H2 and because the exception happens due to null ID I would suggest that the issue might be in the GenerationType of ID which is AUTO instead of SEQUENCE. If you think it's correct then the problem might be that the transaction wasn't committed first to get the id.

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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Ivo Bek 2014-03-31 08:17:34 UTC
Created attachment 880597 [details]
stacktrace

Comment 2 Maciej Swiderski 2014-04-01 12:24:47 UTC
fixed by making sure that id of the deadline is not used for hash code when it's null. The problem with auto generation of the entity in this case is caused by entity is actually not yet in the persistence context. The error is thrown by task rules evaluation that is happening before task is persisted thus no way to have id set.

jbpm
master:
https://github.com/droolsjbpm/jbpm/commit/58c9d1c091d193f131888d147cff1d869cc9e099

6.0.x:
https://github.com/droolsjbpm/jbpm/commit/41ecf9c92d1eeb88b8b7018e535fe96d89d3c6b5

Comment 3 Ivo Bek 2014-05-06 09:54:44 UTC
I return this BZ. As I talked with Maciej, the changes should be also in the jbpm-human-task-core here https://github.com/droolsjbpm/jbpm/blob/6.0.x/jbpm-human-task/jbpm-human-task-core/src/main/java/org/jbpm/services/task/impl/model/DeadlineImpl.java#L146 because jbpm-human-task-jpa is not used in BPMS 6.0.x ... actually it is for the future BPMS 6.1

Comment 4 Maciej Swiderski 2014-05-07 15:08:59 UTC
fixed in jbpm-human-task-core module:

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

Comment 5 Ivo Bek 2014-06-08 07:55:45 UTC
Verified in BPMS 6.0.2.ER3