Bug 1004681

Summary: Task completion is not rolled back when Process Engine throws a Exception
Product: [JBoss] JBoss Enterprise BRMS Platform 5 Reporter: Toshiya Kobayashi <tkobayas>
Component: jBPM 5Assignee: Kris Verlaenen <kverlaen>
Status: VERIFIED --- QA Contact: Marek Baluch <mbaluch>
Severity: high Docs Contact:
Priority: unspecified    
Version: BRMS 5.3.1CC: nwallace
Target Milestone: GA   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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:
Bug Depends On:    
Bug Blocks: 1022758    
Attachments:
Description Flags
jBPMEx67_exception_after_task_completion.zip none

Description Toshiya Kobayashi 2013-09-05 08:34:09 UTC
Description of problem:

In TaskServiceSession.taskOperation(), Process notification is done after transaction commit. Because of this, task operation (completing a task) and process execution (triggered by task completion) are executed in different transactions. So there would be a case where process execution is rolled back but task completion is not rolled back.

Steps to Reproduce:
1. Run ProcessMainJPA.java in jBPMEx67_exception_after_task_completion.zip

This example process throws an RuntimeException in a Script Node after a User Task Node.

Actual results:

Task is completed.

Expected results:

Task is rolled back. (= InProgress)

Comment 1 Toshiya Kobayashi 2013-09-05 08:34:56 UTC
Fixed in master.

https://github.com/droolsjbpm/jbpm/commit/63afb97f395c165b2bc0ce24b2c8d4f447f3a41f

Comment 3 Toshiya Kobayashi 2013-09-05 08:45:50 UTC
Created attachment 794094 [details]
jBPMEx67_exception_after_task_completion.zip

Comment 6 Jiri Svitak 2014-02-11 15:01:04 UTC
Verified in 5.3.1.BRMS-P05.