Migrate VMH Integration - Phase 2: Webhook endpoints
- Added services/espocrm.py: EspoCRM API client with Redis support - Added 6 VMH webhook steps for EspoCRM integration: Beteiligte webhooks: - POST /vmh/webhook/beteiligte/create - POST /vmh/webhook/beteiligte/update - POST /vmh/webhook/beteiligte/delete Bankverbindungen webhooks: - POST /vmh/webhook/bankverbindungen/create - POST /vmh/webhook/bankverbindungen/update - POST /vmh/webhook/bankverbindungen/delete All webhook endpoints receive batch/single entity notifications from EspoCRM and emit queue events for downstream processing. Note: Complex sync handlers (event processors) not yet migrated - they require additional utility modules (beteiligte_sync_utils.py, mappers, notification_utils) which will be migrated in Phase 3. Updated MIGRATION_STATUS.md with Phase 2 completion.
This commit is contained in:
@@ -163,24 +163,36 @@ From old `requirements.txt` and code analysis:
|
||||
- ✅ MIGRATION_GUIDE.md reviewed
|
||||
- ✅ Migration patterns documented
|
||||
- ✅ New system has example ticketing steps
|
||||
- ✅ **Advoware Proxy Steps migrated** (GET, POST, PUT, DELETE)
|
||||
- ✅ **Phase 1: Advoware Proxy Steps migrated** (GET, POST, PUT, DELETE)
|
||||
- ✅ **Advoware API service module migrated** (services/advoware.py)
|
||||
- ✅ Dependencies updated (aiohttp, redis, python-dotenv)
|
||||
- ✅ ExecModule fixed to use correct Python command
|
||||
- ✅ All 4 endpoints registered and running:
|
||||
- `GET /advoware/proxy`
|
||||
- `POST /advoware/proxy`
|
||||
- `PUT /advoware/proxy`
|
||||
- `DELETE /advoware/proxy`
|
||||
- ✅ **Phase 2: VMH Integration - Webhook Steps migrated** (6 endpoints)
|
||||
- ✅ **EspoCRM API service module migrated** (services/espocrm.py)
|
||||
- ✅ All endpoints registered and running:
|
||||
- **Advoware Proxy:**
|
||||
- `GET /advoware/proxy`
|
||||
- `POST /advoware/proxy`
|
||||
- `PUT /advoware/proxy`
|
||||
- `DELETE /advoware/proxy`
|
||||
- **VMH Webhooks - Beteiligte:**
|
||||
- `POST /vmh/webhook/beteiligte/create`
|
||||
- `POST /vmh/webhook/beteiligte/update`
|
||||
- `POST /vmh/webhook/beteiligte/delete`
|
||||
- **VMH Webhooks - Bankverbindungen:**
|
||||
- `POST /vmh/webhook/bankverbindungen/create`
|
||||
- `POST /vmh/webhook/bankverbindungen/update`
|
||||
- `POST /vmh/webhook/bankverbindungen/delete`
|
||||
|
||||
### Current Status: Phase 1 Complete ✅
|
||||
### Current Status: Phase 2 Complete ✅
|
||||
|
||||
The simple Advoware Proxy steps have been successfully migrated and are running in production. These steps provide a universal proxy interface to the Advoware API with automatic token management via Redis.
|
||||
VMH Webhook endpoints are now receiving EspoCRM webhook events and emitting queue events for processing. The webhook steps handle batch and single entity notifications and provide deduplication via the event handling system.
|
||||
|
||||
### Next Steps
|
||||
1. Migrate additional service modules (espocrm.py, notification_utils.py, etc.)
|
||||
2. Migrate VMH integration steps (beteiligte, bankverbindungen sync)
|
||||
3. Migrate complex calendar sync steps (requires PostgreSQL)
|
||||
**Note:** The complex sync handlers (beteiligte_sync_event_step.py, bankverbindungen_sync_event_step.py) are NOT yet migrated as they require additional utility modules:
|
||||
- `services/beteiligte_sync_utils.py` (663 lines - distributed locking, retry logic, notifications)
|
||||
- `services/bankverbindungen_mapper.py` (data mapping between EspoCRM and Advoware)
|
||||
- `services/espocrm_mapper.py` (mapping utilities)
|
||||
- `services/notification_utils.py` (in-app notifications)
|
||||
|
||||
These sync handlers process the queue events emitted by the webhook steps and perform the actual synchronization with Advoware. They will be migrated in Phase 3.
|
||||
|
||||
## Notes
|
||||
- Old system was Node.js + Python hybrid (Python steps as child processes)
|
||||
|
||||
Reference in New Issue
Block a user