cancel
Showing results for 
Search instead for 
Did you mean: 

Capture errors from within a Transaction.

Former Member
0 Kudos

Hi,

I'm trying to 'bubble' an error to a calling application. I have an SQL Query action block that fails and I'd like to report the error message to the calling application.

The Action block 'success' property is set false but I see no 'Error Message' property that I can use to report the error description to a calling application. (In this case the jdbc SQL Exception).

That error code is exposed in the Transaction Execution trace (see below). How can I have access to that value from within a transaction?

[WARN ]: com.sap.xmii.Illuminator.logging.LHException: com.sap.xmii.Illuminator.logging.LHException: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]The EXECUTE permission was denied on the object 'LBL_PRODUCTION_DECLARATION_INSERT', database 'MII_LocalStorage', schema 'dbo'.

Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Francois,

you can retrieve the error text of a query using the XPATH expression "myQuery.Results{/Rowsets/FatalError}". You can then terminate the BLT like Christian proposed, or define an output property which is read by the calling BLT.

Michael

Answers (2)

Answers (2)

Former Member
0 Kudos

Thank you both for your prompt reply. This answered my question.

Former Member
0 Kudos

Use the Terminate Transaction action