Search FlexiRule docs

Recent
Pinned

Press Esc to close. Use arrow keys and Enter inside results. Searches are remembered locally.

FlexiRule Docs

Triggers

Triggers act as the entry point for all business logic in FlexiRule. They determine **when** a rule should begin its execution.

Improve this page

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 TypeBest ForExecutionContext Provided
EventReal-time responseSync/Asyncdoc, old_doc
SchedulerBackground tasksAsyncSystem context
CallableReusable logicManagedCaller context

Detailed Sections#


Technical Details#

For implementation details on the dispatcher, see Rule Coordinator.

Callable Triggers Callable triggers (also known as Sub-Rules) are designed to be invoked manually or as part of another rule's execution flow. Execution Context Reference This reference describes the variables available to the engine at the moment of triggering. Trigger System The FlexiRule Trigger System determines when a rule should begin its execution. It is managed by the `RuleCoordinator`, which acts as a … Event Triggers Event triggers react directly to state changes within the Frappe DocType lifecycle. Scheduler Triggers Scheduler triggers are used for background automation and periodic tasks that are not tied to a specific user action or document event.