Bug 767596 - Submitting Human Task with potential owner that is not known to the HT service results with Hibernate exception
Summary: Submitting Human Task with potential owner that is not known to the HT servic...
Keywords:
Status: VERIFIED
Alias: None
Product: JBoss Enterprise BRMS Platform 5
Classification: JBoss
Component: jBPM 5
Version: BRMS 5.3.0.GA
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ER6
: BRMS 5.3.0.GA
Assignee: Kris Verlaenen
QA Contact: Jiri Locker
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-12-14 13:18 UTC by Jiri Locker
Modified: 2021-04-09 12:48 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: ---


Attachments (Terms of Use)
MyProcess.bpmn2 (4.62 KB, application/xml)
2011-12-14 13:23 UTC, Jiri Locker
no flags Details
server.log (16.94 KB, text/plain)
2011-12-14 13:24 UTC, Jiri Locker
no flags Details

Description Jiri Locker 2011-12-14 13:18:57 UTC
Description of problem:
I have a simple process with a single HT node, which has the following definition of potential owner:

> <bpmn2:potentialOwner id="...">
>     <bpmn2:resourceAssignmentExpression id="...">
>         <bpmn2:formalExpression id="...">unknownUser</bpmn2:formalExpression>
>     </bpmn2:resourceAssignmentExpression>
> </bpmn2:potentialOwner>

When I start a process instance through a StatefulKnowledgeSession, the task instance doesn't appear in the HT service. No exception in the client code, no hasErrors() method to find out what went wrong. Only a undescriptive Hibernate exception in the server log. After some investigation I found out that a foreign key constraint was not satisfied when persisting the task.

Version-Release number of selected component (if applicable):
BRMS 5.3.0.DEV5

How reproducible:
always

Steps to Reproduce:
1. run attached BPMN2 process (assuming the "unknownUser" is not defined in the running task service
2. see server log for the exception

Actual results:
org.hibernate.exception.GenericJDBCException and javax.persistence.RollbackException exceptions in server log

Expected results:
more descriptive exception in the task service, explaining why the task couldn't be submitted

Additional info:
attached process and server log

Comment 1 Jiri Locker 2011-12-14 13:23:46 UTC
Created attachment 546722 [details]
MyProcess.bpmn2

Comment 2 Jiri Locker 2011-12-14 13:24:36 UTC
Created attachment 546723 [details]
server.log

Comment 3 Jiri Locker 2012-03-12 17:35:00 UTC
I don't know if any change has been introduced, but it seems the DefaultUserGroupCallbackImpl is registred by default, because the hibernate exception is no longer thrown and the task with uknown potential user is persisted.

But, if the unknown user queries for his potential tasks the result is empty. That means the task cannot be completed/aborted and the process is blocked (if it depends on the task).

I suggest this should be resolved as part of this issue.

Comment 4 Maciej Swiderski 2012-03-20 11:46:02 UTC
This is already implemented and is ready for review as standalone commit that can be found here: https://github.com/mswiderski/jbpm/commit/8282bac9c9b0bb708b2708e2da03fc7bc228cbb1

Once reviewed it must be merged with recent changes related to handling persistence in task service.

Comment 5 Maciej Swiderski 2012-04-02 09:32:40 UTC
pull request prepared and can be found at: https://github.com/droolsjbpm/jbpm/pull/68

Comment 6 Ryan Zhang 2012-04-23 07:36:04 UTC
Update status to ON_QA. Please verify them against ER6.


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