Bug 1045695

Summary: Non-transactional part of the demo "policy-transaction" does not work
Product: [JBoss] JBoss Fuse Service Works 6 Reporter: Martin Vecera <mvecera>
Component: ExamplesAssignee: kconner
Status: CLOSED NOTABUG QA Contact: Martin Vecera <mvecera>
Severity: urgent Docs Contact:
Priority: urgent    
Version: 6.0.0CC: atangrin, dlesage, jsedlace, ncross, soa-p-jira, toigaras
Target Milestone: ER4   
Target Release: 6.0.0   
Hardware: All   
OS: All   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-12-23 01:20:00 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:

Description Martin Vecera 2013-12-21 09:23:50 UTC
When running the example with 
mvn -Dexec.args="[any command] policyQSNonTransacted" exec:java

it leads to 
Caught exception of type org.switchyard.HandlerException with message: SWITCHYARD014004: Invalid transaction status : propagatesTransaction is required but the transaction doesn't exist: org.switchyard.HandlerException: SWITCHYARD014004: Invalid transaction status : propagatesTransaction is required but the transaction doesn't exist
	at org.switchyard.handlers.TransactionHandler.evaluateTransactionStatus(TransactionHandler.java:176) [switchyard-runtime-1.1.1-p2-redhat-1.jar:1.1.1-p2-redhat-1]
	at org.switchyard.handlers.TransactionHandler.handleBefore(TransactionHandler.java:140) [switchyard-runtime-1.1.1-p2-redhat-1.jar:1.1.1-p2-redhat-1]
	at org.switchyard.handlers.TransactionHandler.handleMessage(TransactionHandler.java:80) [switchyard-runtime-1.1.1-p2-redhat-1.jar:1.1.1-p2-redhat-1]
...

This is expected from the source code. However, I would expect it to be done in a way the transactional behavior was either ignore, or this way was not suggested in the readme.

Comment 1 Tomohisa Igarashi 2013-12-23 01:20:00 UTC
This is correct behavior. Since WorkService requires "propagatesTransaction", TransactionHandler should throw this "transaction doesn't exist" exception if you invoke it through non-transacted gateway. You need to change the policy on WorkService to get working with the inbound gateway which doesn't provide transaction.