RulesEngine v0.1.1 RulesEngine.RuleGroup View Source
UnitRuleGroup: A unit rule group is a composite rule that acts as a unit: Either all rules are applied or nothing is applied.
ActivationRuleGroup: An activation rule group is a composite rule that fires the first applicable rule and ignores other rules in the group (XOR logic). Rules are first sorted by their natural order (priority by default) within the group.
ConditionalRuleGroup: A conditional rule group is a composite rule where the rule with the highest priority acts as a condition: if the rule with the highest priority evaluates to true, then the rest of the rules are fired.
Link to this section Summary
Link to this section Types
Link to this type
t()
View Source
t() :: %RulesEngine.RuleGroup{ description: String.t(), name: String.t(), priority: non_neg_integer(), rules: [RulesEngine.Rule.t()], type: atom() }
Link to this section Functions
Link to this function
add_rule(rule_group, rule)
View Source
add_rule(RulesEngine.RuleGroup.t(), RulesEngine.Rule.t()) :: RulesEngine.RuleGroup.t()
Link to this function
add_rules(rule_group, rules)
View Source
add_rules(RulesEngine.RuleGroup.t(), [RulesEngine.Rule.t()]) :: RulesEngine.RuleGroup.t()
Link to this function
create(type, rules \\ [])
View Source
create(atom(), [RulesEngine.Rule.t()]) :: RulesEngine.RuleGroup.t()