whomping-willow is a platform that allows you to create, edit and maintain complex conditional based actions and business rules in the form of decision trees.
- Create decision nodes supported by predicates that are evaluated at runtime.
- Create value nodes as final results of the tree evaluation.
- Link nodes to create powerful decision trees.
- You can provide input parameters used to evaluate the decision tree at runtime.
- Also, rust gang gang.
- User can CRUD on DTs.
- Each DT also has context, that can be updated or fetched externally from another service.
- This will allow for use cases, where we don't have context data stored but it is managed in another system.
- For a DT, a predicate should be constructed with an lhs and an rhs.
lhs
will be data received during evaulation via input parameters supplied.rhs
will be constructed using context for the DT.lhs
andrhs
can be constructed using a serde_json's pointer notation.
input params:
{ "monthly_income": 30000 }
context:
{
"account_details": {
"min_monthly_income": 20000
}
}
You would create your predicate with paths as following.
lhs: /monthly_income
rhs: /account_details/min_monthly_income
LTNumber
: Checks iflhs
<rhs
(both are numbers)GTNumber
: Checks iflhs
>rhs
(both are numbers)EQNumber
: Checks iflhs
=rhs
(both are numbers)EQString
: Checks iflhs
=rhs
(both are strings)InListOfString
: Checks iflhs
is inrhs
(lhs
is a string,rhs
is a list of strings)
- Make it non domain specific, use
json path
- Make it a platform? Allow creation of mutliple DTs, with context
- Add a nice JSON editor