Open topic with navigation

TIBCO BusinessEvents® Enterprise Edition 6.3.1

# Transaction Error Handler Rule Function Reference

This table contains references for the Transaction Error Handler rule function.

Argument | Notes
--- | ---
Object txns | You can turn this argument into an `Object[]` within the rule function, for example:
    Object[] array = txns;
The resulting array can be used to obtain useful data: `array[0]` is a `Concept[]` containing all the Concept objects that: have been created in the current RTC, and have not been deleted. `array[1]` is a `Concept[]` containing all the Concept objects that: existed before the current RTC, have been modified in the current RTC, and have not been deleted. `array[2]` is a `Long[]` containing the id of all the Concept objects that: existed before the current RTC, and have been deleted in the current RTC. `array[3]` is a `SimpleEvent[]` containing all the SimpleEvent objects that: are going to be added to the cache. `array[4]` is a `Long[]` containing the id of all the Event objects that: existed before the current RTC, or arrived and started the RTC, and have been deleted in the current RTC.
int errorType | Value can be one of: `-1` for errors happening during database operations. `-2` for errors happening when sending an event.
int errCode | The error code, which is dependent on `errorType`: For database related errors: The error code as returned by `SQLException`, if available Else `-100` if TIBCO BusinessEvents determines that the database is not available Else `-200`, which means that this is an unknown error For sent event errors, the value is `-1`, meaning an internal error condition.
String errMsg | The associated exception message.
long retryCount | The number of times this transaction has been retried before the present call to the callback. Handling Post-RTC action errors: When Post-RTC actions fail, such as acknowledging or sending a message, action handlers try only 10 times with `500` milliseconds sleep. The following parameters can be configured: `be.engine.txn.action.retrycount`, default is `10`. `be.engine.txn.action.sleeptime`, default is `500` milliseconds. Handling Post-RTC database transaction errors: In the case of a database exception, the number of tries and waits between each try are handled by the following configuration parameters: `be.engine.txn.database.retrycount`, default is `maximum integer`. `be.engine.txn.database.sleeptime`, default is `5000` milliseconds. After the number of tries are exhausted, the transaction is canceled. You can also perform additional actions by registering an error handler rule function as before: See `be.txn.error function=projectPathToErrorHandlerRuleFunction`. Note: When the number of tries are exhausted and the transactions are canceled, it is likely that the cache and database are in an inconsistent state. Practice care when setting a limit to the number of retries. Logs should also be monitored for database related exceptions and immediate action should be taken as soon as possible. It is also advised to disable parallel operations if a limit is set to the number of retries. In this case, multiple transactions are committed to the database together and a single database failure can affect multiple of them.

Did you find this helpful?

YesNo
Great!
Thanks for taking the time to give us some feedback.
Sorry about that

Why wasn't this helpful? (check all that apply)

Could not find what I was looking for
Instructions confusing or unclear
Instructions did not work

Want to tell us more?

Please select at least one option or provide details about the issue!!

Error occurred while submitting feedback.

Error2 occurred while submitting feedback.

TIBCO BusinessEvents® Enterprise Edition

Copyright © 2004-2024. Cloud Software Group, Inc. All Rights Reserved.