mojaloop / fraud_risk_management

Central repo for fraud and risk management development and specifications
Other
13 stars 7 forks source link

Predicate Builder Service #161

Closed JohannWNel closed 3 years ago

JohannWNel commented 3 years ago

Build a NodeJS application that can interpret data by writing dynamic query expression as per the below JSON example, and save the result to a specified channel/queue.


{
    "outputTopic": "RuleEngine27Result",
    "outputIfTrue": "SomeValue",
    "outputIfFalse": "AnotherValue",
    "arguments": [
        {
            "predicate": "AND",
            "property": "transaction.amount",
            "operator": "BIGGERTHAN",
            "value": "300"
        },
        {
            "predicate": "AND",
            "property": "transaction.payer.partyIDType",
            "operator": "EQUALS",
            "value": "NATIONALID",
            "nestedPredicate": {
                "predicate": "OR",
                "arguments": [
                    {
                        "predicate": "AND",
                        "property": "transaction.payer.partyIDType",
                        "operator": "EQUALS",
                        "value": "PASSPORT"
                    }
                ]
            }
        }
    ]
}