The REFramework is a project template based on State Machines, which follows the best practices regarding logging, exception handling, application initialization, and others1. The REFramework uses a queue in Orchestrator to store the transaction items, which are the units of data that need to be processed by the automation process1. The status of a transaction item can be set to Failed or Successful using the Set Transaction Status activity, which also allows specifying the ErrorType as Business or Application2. A Business ErrorType indicates that the transaction failed due to a business rule exception, such as invalid or incomplete data2. An Application ErrorType indicates that the transaction failed due to an application exception, such as a system error or a timeout2.
The REFramework has four main states: Init, Get Transaction Data, Process Transaction, and End Process1. The process transitions between these states based on the conditions and triggers defined in the state machine1. The process starts with the Init state, where the application is initialized and the Config file is read1. Then, the process moves to the Get Transaction Data state, where the next transaction item is retrieved from the queue1. If there is a transaction item available, the process moves to the Process Transaction state, where the main logic of the automation is executed1. If the transaction is processed successfully, the status is set to Successful and the process returns to the Get Transaction Data state1. If the transaction fails due to a Business ErrorType, the status is set to Failed and the process also returns to the Get Transaction Data state, without retrying the transaction1. If the transaction fails due to an Application ErrorType, the status is set to Failed and the process retries the transaction until the maximum number of retries is reached1. If there is no transaction item available, or if the maximum number of retries is reached, or if a System Error occurs, the process moves to the End Process state, where the application is closed and the final report is generated1.
Therefore, considering a process developed using REFramework, if the status of a transaction was set to “Failed” with the ErrorType specified as “Business”, the process will transition to the Get Transaction Data state, where it will fetch the next transaction item from the queue.