-
Notifications
You must be signed in to change notification settings - Fork 26
Future development
Kyle Knoepfel edited this page Dec 22, 2021
·
5 revisions
-
Remove support for multiple logic engines; only one is needed.
-
Remove need for
module
,name
, andparameters
names in the configuration. The following configuration should be sufficient:logic_engine: { facts: { f1: "val > 14" }, rules: { r1: { expression: "val", actions: ["publisher"] } } }
-
Long-term: There is an awkward entanglement between the
publishers
configurations and that of thelogic_engine
--specifically, the publishers to be executed need to be specified (to some degree) in both types of configurations. As a longer-term solution, I recommend the following change:Current Suggested { sources: {...}, transforms: {...}, logicengines: { le: { module: 'decisionengine.framework.logicengine.LogicEngine', name: 'LogicEngine', parameters: { facts: { f1: "val > 14" }, rules: { r1: { expression: "val", actions: ["p1"] false_actions: ["p2"] } } } } }, publishers: { p1: {...} p2: {...} } }
local val_big_enough = "val > 14"; { sources: {...}, transforms: {...}, publishers: { p1: { run_if: val_big_enough }, p2: { run_unless: val_big_enough } } }