REFramework and Complex Business Processes
The state machine
The Robotic Enterprise Framework is a state machine with four states: Initialization (read Config, kill/close orphaned processes, open applications, first-run check), Get Transaction Data (fetch the next item from a queue, DataTable, file or custom source), Process Transaction (the business logic in Process.xaml), and End Process (close applications, log results). io_RetryNumber, in_TransactionNumber and in_Config are the key arguments threaded through.
Config values come from Config.xlsx sheets (Settings, Constants, Assets) via InitAllSettings, which also reads Orchestrator assets so environment-specific values never appear in code. Exception behaviour is the heart of the framework: a BusinessRuleException marks the item Failed immediately with no retry; a system exception retries up to MaxRetryNumber, then marks it Failed with the reason via SetTransactionStatus. The transaction item type is configurable, so the same skeleton fits queues, spreadsheets or files.
Traps
- Throwing a generic Exception for a business rule, causing pointless retries.
- Forgetting that Process Transaction must throw for a failure to be recorded; a swallowed error yields a false Success.
- Editing the framework's state transitions instead of adding states deliberately.
- Hard-coding environment values instead of using Config.
- Off-by-one errors between First Run index and retry counters.
Rule of thumb
Put only business logic in Process.xaml; everything environment-specific goes into Config; every failure path must end in an explicit Set Transaction Status.