3

What is the difference between automatic and commit transaction modes in WMB 8.0 compute node ?

We have developed a message flow with a compute node which inserts records into Oracle DB tables. The flow looks like
MQInputNode (Out terminal) --- > Compute Node MQInputNode (Catch terminal) --- > Error handling flow

The properties which we have set in that flow are as below.

  1. MQ Input node has transaction property as "Yes"
  2. Compute node transaction property as "Automatic"
  3. MQ Input Node catch terminal is connected to already developed error handling sub flow

In compute node, we are just parsing the message and inserting the records into tables. Consider the scenario that the message is having 2 records. First record is valid and second record is invalid.

When we set, transaction property as "Automatic", first record is getting inserted and committed properly eventhough the insertion of second record throwing exception. We consider that it is a successfull flow because we have catched that exception and handled properly using MQ Input catch terminal.

But when we set, transaction property as "Commit", even first record is not getting inserted. WMB developers who work with me have told that "Commit" is a node level property, so when the second records inserts, it throwing exception and first record is getting roled back from DB.

I have gone through the WMB info center. No where mentioned that Automatic is Commit is node level and if any exception in that node will rollback the records inserted.

Please clarify.

Pushparaj S
  • 31
  • 1
  • 4

2 Answers2

0

The setting controls both the transactionality and the transaction scope.

If set to "Automatic" then the transactionality is inherited from the Input Node. In this case the input node is set to "Yes" so you get transactionality with the scope fo the transaction covering the entire invocation of the message flow.

When set to "commit" the scope of the transaction is the compute node itself and work will be committed as processing exits the compute node (by exiting in this case I mean the compute node completing, not exiting via propagate into another node).

Dave
  • 633
  • 4
  • 6
-1

Automatic: You'll lose data inserted into database if your tnx gets a failure after db operation.(rollback)

Commit: db data will be committed even if there is a failure in your tnx

Mr. E
  • 2,070
  • 11
  • 23
Girish
  • 1
  • 1