I’m using the JDBC adapter to connect to DB2 on OS/390. I have one input document to my IC that will do multiple inserts. If one insert fails, how can I rollback?
You can use the transaction management services provided by webMethods Developer to handle transactions. These services can be found in WmART\pub\art\transaction. Begin your flow service with a Start Transaction service. Just below this will be a Sequence service that has two children (the try/catch block). Your first sequence should exit on success. Your try sequence should exit on failure. Your catch sequence should exit on done. Within the try sequence, insert your adapter services that execute the SQL necessary for your transaction. After the SQL services, insert a commitTransaction service call. In your catch sequence, insert a rollbackTransaction service call. I have done this on DB2 for OS/390 Version 7 using DB2Connect Version 7.2 in the middle and transactions were executing as expected.