BeaPro Framework¶
The BeaPro (BotCity Enterprise Automation Process) is a production-ready automation framework built on top of BotCity that provides state management, structured error handling, and seamless integration with BotCity Orchestrator.
It comes with the scaffolding already in place and BotCity's Orchestrator integration are all handled for you, so you can focus on the automation logic itself.
Features¶
- State Management: Built-in tracking of success/error counts and execution status
- Structured Exception Handling: Automatic handling of business exceptions, system exceptions, and interruption requests
- Default Logging: File-based and BotCity Orchestrator logging with timestamps
- Multiple Data Sources: Support for CSV files and BotCity Datapools
- Error Reporting: Screenshot capture and error reporting to BotCity Orchestrator
- Graceful Finalization: Automatic cleanup, result file uploads, and task completion
- Restart Capability: System exception recovery with automatic restart
- Flexible Structure: All framework files are contained in the
framework/folder, leaving room for your own files and modules
Project Structure¶
BeaPro/
├── bot.py # Main automation orchestrator
├── framework/ # Core framework modules
│ ├── state.py # State management and BotCity SDK setup
│ ├── exceptions.py # Custom exception classes
│ ├── datasources.py # Data source implementations (CSV, Datapool)
│ ├── process.py # Main automation logic
│ ├── initialize.py # Initialization and setup
│ ├── finalize.py # Cleanup and finalization
│ ├── status_handling.py # Exception and success handlers
│ └── logger.py # Logging configuration
├── build/ # Build scripts
│ └── build files # Creates the .zip file for deployment
├── requirements.txt # Required bot packages
├── .env # Environment variables for local testing
├── output/ # Generated logs and result files
└── temp/ # Temporary files (screenshots, etc.)
Exception Handling Flow¶
For each item:
├─ Try: process_item(item)
│ ├─ Success → register_success()
│ └─ Exception:
│ ├─ InterruptException → handle_interrupt_requested() → STOP
│ ├─ BusinessException → handle_business_exception() → CONTINUE
│ └─ SystemException → handle_system_exception() → RESTART → CONTINUE
└─ Next item