tazama-lf / frms-coe-startup-lib

frms-coe-startup-lib
Apache License 2.0
2 stars 0 forks source link

coe-startup-lib - crsp rename to ed #76

Closed Sandy-at-Tazama closed 2 months ago

Sandy-at-Tazama commented 2 months ago

Acceptance criteria

Original issue: https://github.com/frmscoe/frms-coe-startup-lib/issues/31

Justus-at-Tazama commented 2 months ago
sequenceDiagram

    participant TS as Transaction<br>System
    participant TMS as Transaction<br>Monitoring<br>Service API
    participant ED as Event<br>Director
    participant RP as Rule<br>Processors
    participant TP as Typology<br>Processor
    participant IS as Interdiction<br>Service
    participant TADP as Transaction Aggregation<br>and<br>Decisioning Processor
    participant AS as Alert<br>Service
    participant CMS as Case<br>Management<br>System
    participant NATS as NATS<br>Service

    %% Startup Section %%
    note over TS: Setup - init(func, logger, consumer[], producer)
    ED ->> NATS: init(func, logger, "event-director",)
    RP ->> NATS: init(func, logger, ["sub-rule-xxx"],"pub-rule-xxx") per rule processor
    TP ->> NATS: init(func, logger, ["pub-rule-xxx"],"temp-pub-tadp") per typology
    IS ->> NATS: init(func, logger, ["typology-yyy"],{external})
    TADP ->> NATS: init(func, logger, ["typology-yyy"],{})
    AS ->> NATS: init(func, logger, ["tadp"],{external})

    %% Publish Section %%
    note over TS: Publish
    TS ->> TMS: POST(transaction)
    TMS ->> ED: publish to "event-director"
    ED ->> RP: publish to "sub-rule-xxx"
    RP ->> TP: publish to "pub-rule-xxx"
    TP ->> IS: interdiction: publish to "interdiction-service"
    IS ->> TS: interdiction(typology result)
    TP ->> TADP: publish to "typology-yyy"
    TADP ->> AS: alert: publish to "alert-service"
    AS ->> CMS: alert(evaluationResult)
flowchart LR

    TS[Transaction<br>System] --> TMS[Transaction<br>Monitoring<br>Service API]
    TMS --> EDin[event-director]:::nats
    EDin --> ED[Event<br>Director]
    ED --> RPin001[sub-rule-001@1.0.0]:::nats & RPin500[...]:::nats & RPin999[sub-rule-999@1.0.0]:::nats
    RPin001 --> RP001[Rule<br>Processor<br>001]
    RPin500 --> RP500[...]
    RPin999 --> RP999[Rule<br>Processor<br>999]
    RP001 --> RPout001[pub-rule-001@1.0.0]:::nats
    RP500 --> RPout500[...]:::nats
    RP999 --> RPout999[pub-rule-999@1.0.0]:::nats
    RPout001 --> TypP[Typology<br>Processor]
    RPout500 --> TypP[Typology<br>Processor]
    RPout999 --> TypP[Typology<br>Processor]
    TypP --> Typ001[typology-001@1.0.0]:::nats & Typ500[...]:::nats & Typ999[typology-999@1.0.0]:::nats & IS[interdiction-service]:::nats
    Typ001 --> TADP[Transaction Aggregation<br>and<br>Decisioning Processor]
    Typ500 --> TADP
    Typ999 --> TADP
    TADP --> AS[Alert<br>Service]:::nats

    NATS[NATS<br>Subject]:::nats

    classDef nats stroke:#00f,stroke-width:4px;