Bug 779506 (SOA-1889)

Summary: ExecuteJobCommand in ESB's jBPM integration doesn't roll back the transaction even if the action handler throws Exception
Product: [JBoss] JBoss Enterprise SOA Platform 5 Reporter: Toshiya Kobayashi <tkobayas>
Component: JBPM - within SOAAssignee: Kevin Conner <kevin.conner>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: high    
Version: 5.0.0 ER7   
Target Milestone: ---   
Target Release: 5.0.0 GA, 5.0.0 ER8   
Hardware: Unspecified   
OS: Unspecified   
URL: http://jira.jboss.org/jira/browse/SOA-1889
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-02-10 15:13:39 UTC Type: Feature Request
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Toshiya Kobayashi 2010-01-27 13:36:32 UTC
Date of First Response: 2010-01-28 10:59:06
Help Desk Ticket Reference: https://enterprise.redhat.com/issue-tracker/379428
project_key: SOA

In case that Job execution of an async node is processed by JCA inflow messaging service (SOA-P integration), the transaction is not rolled back even if the action handler throws Exception/RuntimeException. The transaction is commtted and then org.jboss.soa.esb.services.jbpm.integration.job.ExecuteJobCommand.executeJob() kicks one retry which would lead to duplicate commit.

It looks inconsistent with docs:
http://www.redhat.com/docs/en-US/JBoss_SOA_Platform/4.3.CP02/html-single/JBPM_Reference_Manual/index.html#jbpmsbuiltinasynchronousmessaging
============
If execution of a command message fails, the transaction will be rolled back. After that, a new transaction will be started that adds the error message to the message in the database. The command executor filters out all messages that contain an exception.
============

I've attatched a reproducer.
- unzip jobexecution.zip
- modify build.properties
- ant deploypar
- ant deploy
- ant ejbclient (or access jbpm-console to start process instance)
- access jbpm-console to check process instance's id which is created by the action handler (which should be rolled back)

Comment 1 Kevin Conner 2010-01-27 13:37:11 UTC
Link: Added: This issue is related to SOA-1882


Comment 2 Kevin Conner 2010-01-27 13:43:26 UTC
Link: Added: This issue depends JBESB-3159


Comment 3 Kevin Conner 2010-01-28 15:59:06 UTC
Fix has been included in the ESB codebase, will be in the next merge.

Comment 4 Toshiya Kobayashi 2010-02-10 15:13:39 UTC
Verified