Error Handling in REFramework

Good day. I would like to know how should I handle errors in REFramework. I have a process inside the Process Transaction state wherein I might encounter business errors and my data consist of multiple rows. What should I do to keep my process running (will only stop if no data available) even if it encountered an error like it will only log the error but will proceed to the next row? How should I use the Throw activity since this is the one that I’m using inside my process?

@Bruskie143

Use try-catch blocks to catch exceptions within the Process Transaction state.
Log errors using the provided logging mechanisms.
Continue to the next transaction after logging the error in the catch block.
Only use the “Throw” activity when you need to halt the process completely due to a critical error that can’t be handled gracefully.

Hi @Bruskie143

You are invoking the workflow2 in workflow1. In workflow to you have encapsulate the code with Try catch activity. If you want to throw any business exception in specific activity then use the throw activity in that specific to handle the business exceptions.
In Workflow2 we have used try catch, in catch give the rethrow activity which rethrows the error from workflow2 to workflow1.

In Workflow1 also you can use the throw activity where you want to required to handle the business exceptions.

The RE Frameworks is designed to handle the business and system exceptions. So If any error is occurred in any process it will catch the error and depends on the success, business and system exceptions it will move from process state to other state. If System exception is occurred in process state the bot go from process to init state, If business exception is occured in process state the bot go from process to get transaction state.

Hope it helps!!

Hello @Bruskie143 ,
In the Process Transaction state, you can use the following approach:

  • Wrap your row-level processing logic (where you might encounter business errors) in a Try-Catch block. This way, if an error occurs, it won’t cause the entire process to fail.

  • If an error occurs within the Try block, catch the exception and log the error using the Log Message activity or any other appropriate logging mechanism. This will ensure you have a record of the error for later analysis.

  • After logging the error, you can use a Throw activity within the Catch block. The purpose of the Throw activity is to signal to the REFramework that an error has occurred, but you don’t want the entire process to stop. It allows you to gracefully handle the error and continue with the next transaction.

Also In RE Frame Work, If if there is any Business exception , It will Move to the Next transaction regardless of whether the Current transaction is a Success or not and also if there is any System Exception it will go to init State and it keeps retrying for the Specific number of times that you have specified in the Orchestrator Queues or Config file.
Regards;)

Hello @Bruskie143

  1. In the Process Transaction state, use a Try Catch block.
  2. Put your main logic in the Try block.
  3. If a business error occurs, log the error and move to the next transaction in the Catch block.
  4. Use the Throw activity within the Try Catch for specific scenarios.
  5. Transactions continue processing despite errors.
  6. Consider adding a retry mechanism and robust logging.

Thanks & Cheers!!!