frmscoe / General-Issues

This repo exists to track current work and any issues within the FRMS CoE
2 stars 0 forks source link

Payload Time-relative rule execution #253

Closed Justus-at-Tazama closed 9 months ago

Justus-at-Tazama commented 11 months ago

As an Actio platform operator, I want to evaluate a transaction ingested via batch as if it were ingested at the time that the transaction was performed, So that I can evaluate the transaction based on the data that would have been available at the time of the transaction And so that the transaction evaluation results are comparable to other evaluations at the time And so that the evaluation results are not skewed by transactions that were "out of frame" for the evaluation And so that evaluations for the same transactions across different calibrations can be compared And so that platform evaluation for a given calibration can be recreated (replayability)

While this functionality is primarily required to satisfy the requirements of pseudo-real-time evaluations of batch-ingested transactions, the principle may very well be applied universally across the platform. Any transaction received in real-time should only have sight of previous transactions that are "in frame" and should not include transactions that are in the future from the perspective of the evaluated transaction. Transactions may be evaluated out of sequence due to minor variations in the timing of evaluations when the platform is under extreme load and horizontal scaling results in unforeseen race conditions.

Acceptance criteria

  1. Parameterise all rule queries with the trigger payload's timestamp (e.g. pacs.002 FIToFIPmtSts.GrpHdr.CreDtTm) as a proxy for NOW.
  2. Add an additional FILTER to all rule queries to limit historical queries to results prior to proxyNow.

Summary of changes for rule processors:

https://github.com/frmscoe/rule-001/issues/24 https://github.com/frmscoe/rule-002/issues/24 https://github.com/frmscoe/rule-003/issues/24 https://github.com/frmscoe/rule-004/issues/29 https://github.com/frmscoe/rule-006/issues/25 https://github.com/frmscoe/rule-007/issues/28 https://github.com/frmscoe/rule-008/issues/25 https://github.com/frmscoe/rule-010/issues/20 https://github.com/frmscoe/rule-011/issues/19 https://github.com/frmscoe/rule-016/issues/24 https://github.com/frmscoe/rule-017/issues/22 https://github.com/frmscoe/rule-018/issues/30 https://github.com/frmscoe/rule-020/issues/25 https://github.com/frmscoe/rule-021/issues/20 https://github.com/frmscoe/rule-024/issues/6 https://github.com/frmscoe/rule-025/issues/23 https://github.com/frmscoe/rule-026/issues/5 https://github.com/frmscoe/rule-027/issues/25 https://github.com/frmscoe/rule-030/issues/16 https://github.com/frmscoe/rule-044/issues/22 https://github.com/frmscoe/rule-045/issues/23 https://github.com/frmscoe/rule-048/issues/25 https://github.com/frmscoe/rule-054/issues/20 https://github.com/frmscoe/rule-063/issues/21 https://github.com/frmscoe/rule-074/issues/23 https://github.com/frmscoe/rule-075/issues/26 https://github.com/frmscoe/rule-076/issues/22 https://github.com/frmscoe/rule-083/issues/23 https://github.com/frmscoe/rule-084/issues/21 https://github.com/frmscoe/rule-090/issues/20

The following rules do not need to be updated: Rule 028 Rule 078 Rule 091

Justus-at-Tazama commented 9 months ago

Completed, archiving.