An unattended enterprise Robotic Process Automation (RPA) solution built with UiPath Robotic Enterprise Framework (REFramework) using C#. It delivers high-throughput financial invoice extraction, automated Nigerian VAT (7.5%) & WHT withholding reconciliation, and automated document posting into SAP S/4HANA (FI/MM modules) via OData APIs.
- Enterprise REFramework in C#: Production-grade state machine ensuring robust transaction management, configurable retry scopes, and segregation of business vs system exceptions.
- Compiled High-Performance C# RegEx Engine: Custom class library (
EnterpriseRPA.RegexEngine) utilizing precompiled regular expressions for multi-currency invoice subtotals, FIRS Tax IDs (TIN), SAP PO numbers (4500######), and WBS/Cost Centers. - Dual-Mode AI Extraction (Gemini / Vertex AI): Incorporates intelligent fallback to multimodal Large Language Models when documents contain non-standard formatting or scan degradation below confidence threshold (
< 0.85). - SAP S/4HANA OData Mock Server: Lightweight FastAPI implementation of standard SAP ERP OData endpoints (
API_OP_INVOICE_PROCESS_SRV) allowing complete offline verification of 3-way matching and document posting without requiring live SAP infrastructure. - Enterprise IT Governance: Complete Solution Design Document (SDD) authored to enterprise governance and security compliance standards.
flowchart TD
subgraph UiPath_REFramework ["UiPath REFramework (C#)"]
Init[Init State: Read Config.xlsx & Verify SAP Health] --> GetTrans[Get Transaction Item]
GetTrans --> Process[Process State: Transaction Execution]
Process --> RegEx[Execute C# RegEx Engine]
RegEx --> ConfidenceCheck{Confidence >= 0.85?}
ConfidenceCheck -- Yes --> SAPCheck[Perform 3-Way Match]
ConfidenceCheck -- No --> AIExtract[Invoke Gemini AI Fallback]
AIExtract --> SAPCheck
SAPCheck --> PostSAP[POST to SAP S/4HANA OData]
PostSAP --> SetStatus[Set Transaction Status: Success]
SetStatus --> GetTrans
end
subgraph SAP_ERP ["SAP S/4HANA OData Core"]
PostSAP -.->|REST API| OData[API_OP_INVOICE_PROCESS_SRV]
OData -.-> ClearedDoc[(Posted & Parked FI Document)]
end
enterprise-rpa-financial-reconciliation/
├── CustomActivities/
│ ├── InvoiceRegexEngine/ # C# Class Library (.NET 8.0/10.0)
│ │ ├── RegexParser.cs # Compiled RegEx patterns & math checks
│ │ └── InvoiceRegexEngine.csproj
│ └── InvoiceRegexEngine.Tests/ # xUnit Test Suite
│ ├── ParserTests.cs # Unit tests for multi-currency invoices
│ └── InvoiceRegexEngine.Tests.csproj
├── EnterpriseReconciliationBot/ # UiPath Studio Project
│ ├── project.json # Project dependencies & runtime config
│ ├── Main.xaml # REFramework State Machine
│ ├── Process.xaml # Business logic execution
│ ├── Data/
│ │ ├── Config.xlsx # Enterprise configuration workbook
│ │ └── generate_config.py # Automated configuration generator
│ └── Services/
│ └── GeminiAiFallback.xaml # REST AI extraction fallback
├── mock_sap_server/ # SAP S/4HANA Mock API Server
│ ├── app.py # FastAPI OData simulation
│ └── test_mock_sap.py # pytest validation suite
├── docs/
│ └── SDD_Invoice_Reconciliation_v1.0.md # Signed Solution Design Document
├── .gitignore
└── README.md
Verify the compiled regular expressions and mathematical reconciliation rules:
cd CustomActivities/InvoiceRegexEngine.Tests
dotnet testStart the mock SAP OData service on port 8000:
cd mock_sap_server
python -m uvicorn app:app --reload --port 8000Run the automated validation tests:
python -m pytest test_mock_sap.py- Open
EnterpriseReconciliationBot/project.jsonin UiPath Studio 2024.10+. - Confirm package restoration (
UiPath.WebAPI.Activities,UiPath.Excel.Activities). - Run
Main.xamlin Debug or Run mode.
Jerry A. Nabasu
- Role: Automation & Digital Innovation Professional
- Certifications: GInI Certified Innovation Strategist (CInS), GInI Certified Innovation Professional (CInP), UiPath Advanced Developer (Romania 2024)
- GitHub: @JayNabasu
- Email: jerrynabasu@gmail.com