Hide Forgot
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
Created attachment 546722 [details] MyProcess.bpmn2
Created attachment 546723 [details] server.log
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.
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.
pull request prepared and can be found at: https://github.com/droolsjbpm/jbpm/pull/68
Update status to ON_QA. Please verify them against ER6.