commit b76250834ecae6cbacd526c83769f56a52afda87
parent 187e5324f119f478c00e5350e5ca86b9215313f5
Author: Sebastian <sebasjm@gmail.com>
Date: Mon, 19 May 2025 14:55:06 -0300
fix #9777 #9778
Diffstat:
1 file changed, 32 insertions(+), 24 deletions(-)
diff --git a/deployments/tops.rst b/deployments/tops.rst
@@ -1953,6 +1953,8 @@ variables/functions are available:
* ``propBecameFalse(prop)``: Helper predicate that returns true iff a property was true before (in ``oldProps``)
and is now false or undefined (in ``newProps``).
+The event-rule tag is included to reference the implementation and testing functions in code.
+
vqf_902_1_officer
^^^^^^^^^^^^^^^^^
@@ -1967,7 +1969,7 @@ Events:
.. code:: javascript
if (propBecameTrue(ACCOUNT_OPEN)) {
- emit(INCR_ACCOUNT_OPEN);
+ emit(INCR_ACCOUNT_OPEN); # event-rule 1
const isPep = (
newProps.PEP_FOREIGN ||
@@ -1976,27 +1978,27 @@ Events:
);
if (isPep) {
- emit(INCR_PEP);
+ emit(INCR_PEP); # event-rule 2
}
if (newProps.PEP_FOREIGN) {
- emit(INCR_PEP_FOREIGN);
+ emit(INCR_PEP_FOREIGN); # event-rule 3
}
if (newProps.PEP_DOMESTIC) {
- emit(INCR_PEP_DOMESTIC);
+ emit(INCR_PEP_DOMESTIC); # event-rule 4
}
if (newProps.PEP_INTERNATIONAL_ORGANIZATION) {
- emit(INCR_PEP_INTERNATIONAL_ORGANIZATION);
+ emit(INCR_PEP_INTERNATIONAL_ORGANIZATION); # event-rule 5
}
if (newProps.HIGH_RISK_CUSTOMER) {
- emit(INCR_HIGH_RISK_CUSTOMER);
+ emit(INCR_HIGH_RISK_CUSTOMER); # event-rule 6
}
if (newProps.HIGH_RISK_COUNTRY) {
- emit(INCR_HIGH_RISK_COUNTRY);
+ emit(INCR_HIGH_RISK_COUNTRY); # event-rule 7
}
}
@@ -2020,22 +2022,22 @@ Events:
if (oldProps.ACCOUNT_OPEN) {
if (propBecameTrue(PEP_FOREIGN) {
- emit(INCR_PEP_FOREIGN);
+ emit(INCR_PEP_FOREIGN); # event-rule 8
}
- if (propBecameTrue(PEP_DOMESTIC) {
- emit(INCR_PEP_INTERNATIONAL_ORGANIZATION);
+ if (propBecameTrue(PEP_INTERNATIONAL_ORGANIZATION) {
+ emit(INCR_PEP_INTERNATIONAL_ORGANIZATION); # event-rule 9
}
if (propBecameTrue(PEP_DOMESTIC) {
- emit(INCR_PEP_DOMESTIC);
+ emit(INCR_PEP_DOMESTIC); # event-rule 10
}
if (propBecameFalse(PEP_FOREIGN) {
- emit(DECR_PEP_FOREIGN);
+ emit(DECR_PEP_FOREIGN); # event-rule 11
}
- if (propBecameFalse(PEP_DOMESTIC) {
- emit(DECR_PEP_INTERNATIONAL_ORGANIZATION);
+ if (propBecameFalse(PEP_INTERNATIONAL_ORGANIZATION) {
+ emit(DECR_PEP_INTERNATIONAL_ORGANIZATION); # event-rule 12
}
if (propBecameFalse(PEP_DOMESTIC) {
- emit(DECR_PEP_DOMESTIC);
+ emit(DECR_PEP_DOMESTIC); # event-rule 13
}
const wasPep = (
oldProps.PEP_DOMESTIC ||
@@ -2046,16 +2048,22 @@ Events:
newProps.PEP_FOREIGN ||
newProps.PEP_INTERNATIONAL_ORGANIZATION);
if (wasPep && !isPep) {
- emit(DECR_PEP);
+ emit(DECR_PEP); # event-rule 14
}
if (!wasPep & isPep) {
- emit(INCR_PEP);
+ emit(INCR_PEP); # event-rule 15
+ }
+ if (propBecameTrue(HIGH_RISK_COUNTRY)) {
+ emit(INCR_HIGH_RISK_COUNTRY); # event-rule 16
+ }
+ if (propBecameFalse(HIGH_RISK_COUNTRY)) {
+ emit(DECR_HIGH_RISK_COUNTRY); # event-rule 17
}
- if (propBecameTrue(HIGH_RISK)) {
- emit(INCR_HIGH_RISK);
+ if (propBecameTrue(HIGH_RISK_CUSTOMER)) {
+ emit(INCR_HIGH_RISK_CUSTOMER); # event-rule 18
}
- if (propBecameFalse(HIGH_RISK)) {
- emit(DECR_HIGH_RISK);
+ if (propBecameFalse(HIGH_RISK_CUSTOMER)) {
+ emit(DECR_HIGH_RISK_CUSTOMER); # event-rule 19
}
}
@@ -2093,7 +2101,7 @@ Events:
if (newProps.INVESTIGATION_STATE == "REPORTED_SUSPICION_SIMPLE" ||
newProps.INVESTIGATION_STATE == "REPORTED_SUSPICION_SUBSTANTIATED" ||
newProps.INVESTIGATION_STATE == "INVESTIGATION_COMPLETED_WITHOUT_SUSPICION") {
- emit(INCR_INVESTIGATION_CONCLUDED);
+ emit(INCR_INVESTIGATION_CONCLUDED); # event-rule 20
}
if (newProps.INVESTIGATION_STATE == "REPORTED_SUSPICION_SUBSTANTIATED") {
// FIXME-#9676: if possible, we should force the AML officer to tick
@@ -2101,7 +2109,7 @@ Events:
// actually do anything here server-side, it's more an explicit
// acknowledgement/reminder to make really sure this event is only
// emitted if the report was files.
- emit(MROS_REPORTED_SUSPICION_SUBSTANTIATED);
+ emit(MROS_REPORTED_SUSPICION_SUBSTANTIATED); # event-rule 21
}
if (newProps.INVESTIGATION_STATE == "REPORTED_SUSPICION_SIMPLE") {
// FIXME-#9676: if possible, we should force the AML officer to tick
@@ -2109,7 +2117,7 @@ Events:
// actually do anything here server-side, it's more an explicit
// acknowledgement/reminder to make really sure this event is only
// emitted if the report was files.
- emit(MROS_REPORTED_SUSPICION_SIMPLE);
+ emit(MROS_REPORTED_SUSPICION_SIMPLE); # event-rule 22
}
}