Hide Forgot
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.
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.