-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
Is your feature request related to a problem? Please describe.
In some cases, rule behavior may need to be customized to best express various use-cases. For example:
- Either require all facts need to be present to fire or to treat absent facts as false
- In regard to Fact retraction and cascading feature #59 (if implemented), enable/disable automatic retraction cascade
Describe the solution you'd like
Add a options parameter to rule creation:
engine.rule(
when=~condition(lambda: Analysis.passed),
then=action(AnalysisResultsPassed()),
options=TreatAbsentFactsAsFalse | AutomaticRetraction
)Where the options are an enum.
However, further design and consideration is required before implementing this solution.
Describe alternatives you've considered
None.
Additional context
None.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels