Workflows
Common workflow patterns and how to implement them.
Standard Workflow
- Trigger — Event or scheduled job
- Validate — Input validation
- Process — Business logic execution
- Persist — Save results
- Notify — Optional callbacks
Error Handling
Failed steps can retry with exponential backoff. Configure max retries per workflow type.
Async Processing
Long-running catalog, audit, and AI agent tasks are dispatched to RabbitMQ and processed by Celery workers (bhcatalogworker, bhauditworker, bhaiagentworker). Celery Beat publishes scheduled tasks.
- APIs enqueue work and return immediately
- Workers persist results to PostgreSQL and object storage
- Poll status endpoints or use Admin notifications for completion