RulesEngine v0.2.0 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 get_sorted_rules(rule_group) View Source