Expense Approval Event Listener
Component Detail
Service Layer
medium complexity
backend
1
Dependencies
1
Dependents
1
Entities
0
Integrations
Description
Internal event subscriber that listens for expense claim approval domain events emitted by the expense approval service. On each event it checks whether the approving organization has an accounting integration configured, then delegates delivery to the Accounting API Connector.
expense-approval-event-listener
Responsibilities
- Subscribe to expense approval domain events from the admin expense approval service
- Resolve whether the organization has an active accounting integration
- Invoke the accounting API connector with the approved expense payload
- Handle delivery failures without blocking or rolling back the approval workflow
Interfaces
onExpenseApproved(event): Promise<void>
isAccountingConfigured(orgId): Promise<boolean>