Create New Rule Processor
Â
 | ATTENTION: This page has been migrated to the Tazama GitHub repository and is now located at: This page will no longer be maintained in Confluence. |
---|
Â
Â
Steps:
Develop the rule processor module (see: https://frmscoe.atlassian.net/wiki/spaces/FRMS/pages/1739942 )
A rule processor will have a unique ID
A rule processor will have a name
A rule processor will have a brief description
A rule processor will have a unique version
Create the rule processor configuration (see: https://frmscoe.atlassian.net/wiki/spaces/FRMS/pages/1739942/3.+Rule+Processing#3.1.-Read-rule-config )
The rule processor configuration will share the rule processor’s unique ID
The rule processor configuration will have its own, unique version
Connect the rule processor
Prerequisite: A rule processor must be associated with an existing typology. If the typology for a rule processor has not yet been created, the typology must be created before the rule processor can be connected. (There are cascading dependencies for the channel and transactions to also exist, though these are direct prerequisites for the typology and channel, respectively.)
Update the typology expression (see: Typology Processing | 5.5. Read typology configuration )
The result for a rule (or each of the sub-rules), which will be either TRUE or FALSE, must be associated with an integer between 0 and 100
The typology expression must be updated by adding the rule ID for the new rule to the expression
Update the Network Map (see: Channel Router and Setup Processor (CRSP) | 3.1. Read Network Map )
The new rule must be linked to all typologies for which it is to be executed by adding the rule to the
transactions.channels.typologies.rules
objects under the channel in the Network Map.The new rule must be described in the network map with the following information:
"id": "003@1.0.0",
"host": "http://gateway.openfaas:8080/function/off-rule-003-rel-1-1-0"
"cfg": "1.0.0",
Config file
{
"id": "002@1.0.0",
"cfg": "1.0.0",
"config": {
"timeframes": [
{
"threshold": 86400000
}
],
"bands": [
{
"subRuleRef": ".01",
"outcome": true,
"reason": "Transaction convergence detected on debtor account"
},
{
"subRuleRef": ".00",
"outcome": false,
"reason": "No Transaction convergence detected on debtor account"
}
]
}
}
Result sample:
{
"transaction": { transaction stuff
},
"networkMap": { networkMap stuff
},
"ruleResult": {
"id": "002@1.0.0",
"cfg": "1.0.0",
"subRuleRef": ".01",
"result": true,
"reason": "Transaction convergence detected on debtor account"
}
}
Network map sample:
Â