Posted: Mon Nov 21, 2005 2:20 pm Post subject: Rollback DB insert on exception in Flow-flw complete normaly
Chevalier
Joined: 17 Sep 2005 Posts: 401 Location: SC
Hi All,
This is Anoop here.
I am having a setup in which there is a compute node doing an DB insert operation (using the passthru()) after with I am attempting an FTP transfer.
The requirement is that in case of an FTP error, I need to send an Email and roll back the DB insert which happened previously.
So the failure terminal of the node doing the FTP is wired to a flow order node to first send the email and then throw another exception as teh second step.
This exception goes back across the compute node doing the insert and is caught after that and handled.
The exception is thus handled and the message flow completes properly. However I need the insert to be rolled back in case of an FTP error. Is there any setting that could do this rollback (other than using a delete statement to explicitly remove the record)?
The transaction property is set to automatic on the compute node doing the insert.
To summarize the setup:
trycatch (try term)-> computenode doing DB insert(out term) -> Ftp node doing FTP (failure term) -> flow order (first send email, second throw user exception)
Rollback only happens at the MQInput node, not at a compute node.
You need to propagate an exception *all* the way back, or build a compensating transaction (the delete). _________________ I am *not* the model of the modern major general.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum