on 11-13-2012 7:24 PM
I have a SQL query - command action block in my transaction used to insert data into a database. I'd like to capture the output of that query into an output variable even when the query fails, but I seem to be having some trouble. Currently, when the query fails (because the insert data is incorrect, or the database isn't available, or any other number of reasons) the transaction terminates and action blocks beyond the query do not get executed. Is there a way to prevent the transaction from terminating and allow me to define the next-step logic when the query fails?
I'm using MII 12.2.3 Build(177)
Hello Alli, just place a catch after your query, this will allocate the exception to a specific branch but will resume the current flow of transaction afterward.
Cheers,
Arnaud
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Arnaud,
I think you on correct, but since this is new functionality with 12.2, you will need to be a bit more explicit in your directions.
Specifically, how does she turn on the exception handling so that the Catch action block functions? ( A picture is worth a thousand words.)
Regards, Mike
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Girls and Guys, yes sorry the answer was a bit short.
Good Idea to put a screenshot of the solution.
Just 2 things: in order for the assign output in case of success to work, you need to create another sequence (1) under the catch and move you ifQueryRanOK (with the green line content) there.
The Orange Line (2) will only be executed if there is an exception just before, while (1) will alway be executed.
The Block (3) should remain under the Catch and orange line,
Cheers,
Arnaud
User | Count |
---|---|
12 | |
6 | |
3 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.