FlexiRule Docs
Triggers
Triggers act as the entry point for all business logic in FlexiRule. They determine **when** a rule should begin its execution.
Trigger System#
Triggers act as the entry point for all business logic in FlexiRule. They determine when a rule should begin its execution.
Comparison of Trigger Types#
| Trigger Type | Best For | Execution | Context Provided |
|---|---|---|---|
| Event | Real-time response | Sync/Async | doc, old_doc |
| Scheduler | Background tasks | Async | System context |
| Callable | Reusable logic | Managed | Caller context |
Detailed Sections#
- Event Triggers: React to DocType state changes.
- Scheduler Triggers: Run on time-based intervals.
- Callable Triggers: Invoked programmatically or by other rules.
- Context Reference: Variables available at trigger time.
Technical Details#
For implementation details on the dispatcher, see Rule Coordinator.