Skip to content

Commit

Permalink
fix classification sequencing by orgId+IUV+IUR+transferIndex
Browse files Browse the repository at this point in the history
  • Loading branch information
antonioT90 committed Dec 19, 2024
1 parent 0100803 commit 34a19f4
Show file tree
Hide file tree
Showing 21 changed files with 85 additions and 72 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ sequenceDiagram
KAFKA ->> WF: Consegna evento

activate WF
WF ->>WF: Invia evento async al<BR />"WF classificazione IUD"<BR /> (signalWithStart)

alt Posizione Debitoria con IUD
WF ->>WF: Invia evento async al<BR />"WF classificazione IUD"<BR /> (signalWithStart)
else
WF ->>WF: Invia evento async al<BR />"WF classificazione Transfer"<BR /> (signalWithStart)
end
WF -->> KAFKA: ack
deactivate WF
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ flowchart TD
linkStyle 5 display:none;

SIGNAL:::send-signal@{shape: delay, label: "Invia evento 'Pagamento Notificato' al workflow 'Classificazione IUD'"}
NOTE@{ shape: braces, label: "signalWithStart con workflowID=IUD" }
NOTE@{ shape: braces, label: "signalWithStart con workflowID=organizationId+IUD" }
end

LOOP --> END@{shape: stop}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ title: WF caricamento file Rendicontazione
flowchart TD
DESCRIPTION@{ shape: braces, label: "Input: ingestionFlowId" }
START@{shape: start} -->
UPDATE_STATUS_INELAB:::activity@{label: "Aggiorna stato ingestionFlow in 'IMPORT_IN_ELAB'"} -->
UPDATE_STATUS_INELAB:::activity@{label: "Aggiorna stato IngestionFlowFile in 'IMPORT_IN_ELAB'"} -->
INGESTION:::activity@{label: "Leggi file e persisti righe"} -->
UPDATE_STATUS_COMPLETE:::activity@{label: "Finalizza stato entità ingestionFlowId"} -->
UPDATE_STATUS_COMPLETE:::activity@{label: "Finalizza stato entità IngestionFlowFile"} -->
SEND_EMAIL:::activity@{label: "Notifica stato import tramite email"} -->

LOOP
Expand All @@ -17,8 +17,8 @@ flowchart TD
DUMMY:::disable-->SIGNAL
linkStyle 5 display:none;

SIGNAL:::send-signal@{shape: delay, label: "Invia evento 'Rendicontazione' con lista di IUV al workflow 'Classificazione IUF'"}
NOTE@{ shape: braces, label: "signalWithStart con workflowID=IUF" }
SIGNAL:::send-signal@{shape: delay, label: "Invia evento 'Rendicontazione' con lista di IUV/IUR/transferIndex al workflow 'Classificazione IUF'"}
NOTE@{ shape: braces, label: "signalWithStart con workflowID=organizationId+IUF" }
end

LOOP --> END@{shape: stop}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ flowchart TD

LOOP

subgraph LOOP["Per ogni IUF restituito dall'activity di ingestion"]
subgraph LOOP["Per ogni IUF/treasuryId restituito dall'activity di ingestion"]

%% dummy block added to have an empty line
DUMMY:::disable-->SIGNAL
linkStyle 5 display:none;

SIGNAL:::send-signal@{shape: delay, label: "Invia evento 'Tesoreria' al workflow 'Classificazione IUF'"}
NOTE@{ shape: braces, label: "signalWithStart con workflowID=IUF" }
SIGNAL:::send-signal@{shape: delay, label: "Invia evento 'Tesoreria' con treasuryId al workflow 'Classificazione IUF'"}
NOTE@{ shape: braces, label: "signalWithStart con workflowID=organizationId+IUF" }
end

LOOP --> END@{shape: stop}
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
title: WF caricamento giornale di cassa XLS
---
flowchart TD
DESCRIPTION@{ shape: braces, label: "Input: path del file da caricare" }
DESCRIPTION@{ shape: braces, label: "Input: ingestionFlowFileId" }
START@{shape: start} -->
UPDATE_STATUS_INELAB:::activity@{label: "Aggiorna stato ingestionFlow in 'IMPORT_IN_ELAB'"} -->
INGESTION:::activity@{label: "Leggi file e persisti righe"}

subgraph INGESTION_NOTE_BLOCK
INGESTION
INGESTION_NOTE@{shape: braces, label: "Restituisce lista IUF e lista IUV"}
INGESTION_NOTE@{shape: braces, label: "Restituisce List&lt;IUF,treasuryId&gt;, <span style=\"color:red\">List&lt;IUV&gt;</span>"}
end
class INGESTION_NOTE_BLOCK note_block

Expand All @@ -24,21 +24,22 @@ flowchart TD
DUMMY1:::hidden-->SIGNAL_IUV
linkStyle 5 display:none;

SIGNAL_IUV:::send-signal@{shape: delay, label: "Invia evento 'Classifica IUV' al workflow 'Classificazione IUV'"}
NOTE_SIGNAL_IUV@{ shape: braces, label: "signalWithStart con workflowID=IUV" }
SIGNAL_IUV:::send-signal@{shape: delay, label: "Invia evento 'Classifica Transfer' al workflow 'Classificazione Transfer'"}
NOTE_SIGNAL_IUV@{ shape: braces, label: "signalWithStart con workflowID=organizationId+IUV" }
end
class LOOP_IUVs loop
style LOOP_IUVs color:red;

LOOP_IUVs --> LOOP_IUFs

subgraph LOOP_IUFs["Per ogni IUF restituito dall'activity di ingestion"]
subgraph LOOP_IUFs["Per ogni IUF/treasuryId restituito dall'activity di ingestion"]

%% dummy block added to have an empty line
DUMMY2:::hidden-->SIGNAL_IUF
linkStyle 7 display:none;

SIGNAL_IUF:::send-signal@{shape: delay, label: "Invia evento 'Tesoreria IUF' al workflow 'Classificazione IUF'"}
NOTE_SIGNAL_IUF@{ shape: braces, label: "signalWithStart con workflowID=IUF" }
SIGNAL_IUF:::send-signal@{shape: delay, label: "Invia evento 'Tesoreria IUF' con treasuryId al workflow 'Classificazione IUF'"}
NOTE_SIGNAL_IUF@{ shape: braces, label: "signalWithStart con workflowID=organizationId+IUF" }
end
class LOOP_IUFs loop

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 13 additions & 8 deletions design/workflow/classificazioneIncassi/05.graphSequencingOps.mmd
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ flowchart TD
NOTE_TES_IUV@{shape: braces, label: "Tesoreria IUV"} -->
START_TES_IUV
linkStyle 2 display:none;
style NOTE_TES_IUV color:red,stroke:red;
end

subgraph NOTE_RT_BLOCK
Expand All @@ -43,35 +44,39 @@ flowchart TD

subgraph RT
START_RT@{shape: start} -->
|IUD|JOIN_IUD@{shape: join} -->
|orgId/IUD|JOIN_IUD@{shape: join} -->
IUD_NO_RT["Gestisci classificazione 'IUD_NO_RT'"] -->
|IUV|JOIN_IUV@{shape: join}
|orgId/IUV/IUR/transferIndex|JOIN_IUV@{shape: join}

START_RT -->
|orgId/IUV/IUR/transferIndex|JOIN_IUV@{shape: join}
end

subgraph RN
START_RN@{shape: start} -->
|IUD|JOIN_IUD@{shape: join}
|orgId/IUD|JOIN_IUD@{shape: join}
end

subgraph REND
START_REND@{shape: start} -->
|IUF|JOIN_IUF@{shape: join} -->
|orgId/IUF|JOIN_IUF@{shape: join} -->
TES_NO_MATCH["Gestisci classificazione 'TES_NO_MATCH'"] -->
|IUV|JOIN_IUV@{shape: join}
|orgId/IUV/IUR/transferIndex|JOIN_IUV@{shape: join}
end

subgraph TES_IUF
START_TES_IUF@{shape: start} -->
|IUF|JOIN_IUF@{shape: join}
|orgId/IUF|JOIN_IUF@{shape: join}
end

subgraph TES_IUV
START_TES_IUV@{shape: start} -->
|IUV|JOIN_IUV@{shape: join}
|orgId/IUV|JOIN_IUV@{shape: join}
linkStyle 14 color:red,stroke:red;
end

JOIN_IUV -->
CLASSIFY_IUV["Classifica IUV"] -->
CLASSIFY_IUV["Classifica Transfer"] -->
END@{shape: stop}

class NOTE_RT_BLOCK,NOTE_RN_BLOCK,NOTE_REND_BLOCK,NOTE_TES_IUF_BLOCK,NOTE_TES_IUV_BLOCK hidden
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,27 +1,30 @@
---
title: Flusso Riconciliazione
---
%%{init:{'themeCSS':'.messageLine0:nth-of-type(8) { stroke: red; };.messageText:nth-of-type(10) { fill: red;};'}}%%

sequenceDiagram
participant EV_RT as Evento<BR />rata pagata
participant WF_RN as WF caricamento<BR />pagamenti notificati
participant WF_R as WF caricamento<BR />file Rendicontazione
participant WF_T as WF caricamento<BR />file Tesoreria
participant WF_CLS_IUD as WF classificazione<BR />IUD
participant WF_CLS_IUF as WF classificazione<BR />IUF
participant WF_CLS_IUV as WF classificazione<BR />IUV
participant WF_CLS_IUV as WF classificazione<BR />Transfer

EV_RT ->>+ WF_CLS_IUD: Classifica IUD
WF_RN ->> WF_CLS_IUD: Classifica IUD
WF_CLS_IUD ->> WF_CLS_IUD: Match IUD
WF_CLS_IUD ->>- WF_CLS_IUV: Classifica IUV
WF_CLS_IUD ->>- WF_CLS_IUV: Classifica Transfer
activate WF_CLS_IUV
EV_RT ->> WF_CLS_IUV: Classifica Transfer (caso no IUD)

WF_R ->>+ WF_CLS_IUF: Rendicontazione
WF_T ->> WF_CLS_IUF: Tesoreria IUF
WF_CLS_IUF ->> WF_CLS_IUF: Match IUF
WF_CLS_IUF ->>- WF_CLS_IUV: Classifica IUV
WF_CLS_IUF ->>- WF_CLS_IUV: Classifica Transfer

WF_T ->> WF_CLS_IUV: Classifica IUV
WF_CLS_IUV ->>- WF_CLS_IUV: Classifica IUV
WF_T ->> WF_CLS_IUV: Classifica Transfer
WF_CLS_IUV ->>- WF_CLS_IUV: Classifica Transfer

note over EV_RT,WF_CLS_IUV: Ogni evento verso 'WF classificazione XXX' comporterà<BR />la rischedulazione del WF qualora non già attivo.<BR/><BR/>L'uso di uno stesso identificativo come workflowID garantisce<BR />la sequenzialità dei processamenti
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 8 additions & 8 deletions design/workflow/classificazioneIncassi/06.classificazioneIud.mmd
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ config:
flowchart TD
subgraph WF_BLOCK
subgraph NOTE_START_BLOCK
DESCRIPTION@{ shape: braces, label: "Input: IUD, IUV" }
DESCRIPTION@{ shape: braces, label: "Input: orgId, IUV, IUR, transferIndex" }
START@{shape: start}
end
class NOTE_START_BLOCK hidden

START -->
SIGNAL_IUV:::send-signal@{shape: delay, label: "Invia evento 'Classifica IUV' al workflow 'Classificazione IUV'"}
SIGNAL_IUV:::send-signal@{shape: delay, label: "Invia evento 'Classifica Transfer' al workflow 'Classificazione Transfer'"}

subgraph NOTE_SIGNAL_IUV_BLOCK
SIGNAL_IUV
NOTE_SIGNAL_IUV@{ shape: braces, label: "signalWithStart con workflowID=IUV" }
NOTE_SIGNAL_IUV@{ shape: braces, label: "signalWithStart con workflowID=orgId+IUV+ IUR+transferIndex" }
end
class NOTE_SIGNAL_IUV_BLOCK note_block

Expand All @@ -30,20 +30,20 @@ flowchart TD

subgraph SIGNAL_RT_BLOCK["Evento Ricevuta"]
direction LR
DESCRIPTION_SIGNAL_RT@{ shape: braces, label: "Input: IUV, IUD" } -->
DESCRIPTION_SIGNAL_RT@{ shape: braces, label: "Input: orgId, IUD, IUV, IUR, transferIndex" } -->
DUMMY1:::hidden --> DUMMY2:::hidden--> DUMMY3:::hidden
linkStyle 2,3,4 display:none

SIGNAL_RT@{ shape: bolt } -->
DELETE_CLASSIFY_NULL_IUV:::activity@{label: "Delete classificazione 'IUD_NO_RT'"} -->
ADD_RT_IUV["Aggiungi IUV "] -->
ADD_RT_IUV["Aggiungi orgId/IUV/IUR/transferIndex "] -->
SIGNAL_RT_END@{ shape: "stop" }
end
class SIGNAL_RT_BLOCK signal_block

subgraph SIGNAL_RN_BLOCK["Evento Pagamento Notificato"]
direction LR
DESCRIPTION_SIGNAL_RN@{ shape: braces, label: "Input: IUD" } -->
DESCRIPTION_SIGNAL_RN@{ shape: braces, label: "Input: organizationId, IUD, transferIndex" } -->
DUMMY4:::hidden --> DUMMY5:::hidden --> DUMMY6:::hidden
linkStyle 8,9,10 display:none;

Expand All @@ -55,7 +55,7 @@ flowchart TD
FIND_RT_IUD["Ricerca Ricevuta tramite IUD"] -->
EXISTS_RT_IUD{"Trovata Ricevuta?"}

EXISTS_RT_IUD -->||RETURN_RT_IUV@{shape: terminal, label: "Restituisci IUV se trovato"}
EXISTS_RT_IUD -->||RETURN_RT_IUV@{shape: terminal, label: "Restituisci orgId/IUV/IUR/transferIndex se trovato"}

EXISTS_RT_IUD -->
|No|SAVE_RN_ANOMALY@{shape: database, label: "Salva classificazione 'IUD_NO_RT'"} -->
Expand All @@ -64,7 +64,7 @@ flowchart TD
class FIND_RT_ACTIVITY activity

FIND_RT_ACTIVITY -->
ADD_RN_IUV["Aggiungi IUV "] -->
ADD_RN_IUV["Aggiungi orgId/IUV/IUR/transferIndex "] -->
SIGNAL_RN_END@{ shape: "stop" }

end
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 10 additions & 10 deletions design/workflow/classificazioneIncassi/06.classificazioneIuf.mmd
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@ config:
flowchart TD
subgraph WF_BLOCK
subgraph NOTE_START_BLOCK
DESCRIPTION@{ shape: braces, label: "Input: IUF, IUVs" }
DESCRIPTION@{ shape: braces, label: "Input: IUF, orgId, List&lt;IUV,IUR,transferIndex&gt;" }
START@{shape: start}
end
class NOTE_START_BLOCK hidden

START --> LOOP_IUVs

subgraph LOOP_IUVs["Per ogni IUV"]
subgraph LOOP_IUVs["Per ogni Transfer"]
direction TB

SIGNAL_IUV:::send-signal@{shape: delay, label: "Invia evento 'Classifica IUV' al workflow 'Classificazione IUV'"}
NOTE_SIGNAL_IUV@{ shape: braces, label: "signalWithStart con workflowID=IUV" }
SIGNAL_IUV:::send-signal@{shape: delay, label: "Invia evento 'Classifica Transfer' al workflow 'Classificazione Transfer'"}
NOTE_SIGNAL_IUV@{ shape: braces, label: "signalWithStart con workflowID=orgId+IUV+ IUR+transferIndex" }
end

LOOP_IUVs --> END@{shape: stop}
Expand All @@ -31,7 +31,7 @@ flowchart TD

subgraph SIGNAL_RENDICONTAZIONE_BLOCK["Evento Rendicontazione"]
direction LR
DESCRIPTION_SIGNAL_RENDICONTAZIONE@{ shape: braces, label: "Input: IUF, codiceEsito, IUVs" } -->
DESCRIPTION_SIGNAL_RENDICONTAZIONE@{ shape: braces, label: "Input: orgId, IUF, codiceEsito, List&lt;IUV,IUR,transferIndex&gt;" } -->
DUMMY1:::hidden --> DUMMY2:::hidden --> DUMMY3:::hidden --> DUMMY4:::hidden --> DUMMY5:::hidden
linkStyle 2,3,4,5,6 display:none

Expand All @@ -47,25 +47,25 @@ flowchart TD
IS_CODICEESITO9 --> |No|ADD_RENDICONTAZIONE_IUVS

HANDLE_CODICEESITO9 -->
ADD_RENDICONTAZIONE_IUVS["Aggiungi IUVs "] -->
ADD_RENDICONTAZIONE_IUVS["Aggiungi IUV/IUR/transferIndex "] -->
SIGNAL_RENDICONTAZIONE_END@{ shape: "stop" }
end
class SIGNAL_RENDICONTAZIONE_BLOCK signal_block

subgraph SIGNAL_TESORERIA_BLOCK["Evento Tesoreria IUF"]
direction LR
DESCRIPTION_SIGNAL_TESORERIA@{ shape: braces, label: "Input: IUF" } -->
DESCRIPTION_SIGNAL_TESORERIA@{ shape: braces, label: "Input: orgId, IUF, treasuryId" } -->
DUMMY6:::hidden --> DUMMY7:::hidden --> DUMMY8:::hidden
linkStyle 14,15,16 display:none

SIGNAL_TESORERIA@{ shape: bolt } --> FIND_TESORERIA_IUVS_ACTIVITY

subgraph FIND_TESORERIA_IUVS_ACTIVITY["Ricerca IUVs tramite IUF"]
subgraph FIND_TESORERIA_IUVS_ACTIVITY["Ricerca Transfers by IUF"]

FIND_TESORERIA_IUVS["Ricerca Rendicontazione IUF"] -->
EXISTS_RENDICONTAZIONE_TES{"Trovata Rendicontazione?"}

EXISTS_RENDICONTAZIONE_TES -->||RETURN_TESORERIA_IUVS@{shape: terminal, label: "Restituisci IUVs trovati"}
EXISTS_RENDICONTAZIONE_TES -->||RETURN_TESORERIA_IUVS@{shape: terminal, label: "Restituisci IUV/IUR/transferIndex trovati"}

EXISTS_RENDICONTAZIONE_TES -->
|No|SAVE_TES_ANOMALY@{shape: database, label: "Salva classificazione 'TES_NO_MATCH'"} -->
Expand All @@ -74,7 +74,7 @@ flowchart TD
class FIND_TESORERIA_IUVS_ACTIVITY activity

FIND_TESORERIA_IUVS_ACTIVITY -->
ADD_TESORERIA_IUVS["Aggiungi IUVs "] -->
ADD_TESORERIA_IUVS["Aggiungi IUV/IUR/transferIndex "] -->
SIGNAL_TESORERIA_END@{ shape: "stop" }
end
class SIGNAL_TESORERIA_BLOCK signal_block
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
---
title: WF Classificazione IUV
title: WF Classificazione Transfer
config:
flowchart:
rankSpacing: 1
---
flowchart TD
subgraph WF_BLOCK
subgraph NOTE_START_BLOCK
DESCRIPTION@{ shape: braces, label: "Input: IUV" }
DESCRIPTION@{ shape: braces, label: "Input: orgId, IUV, IUR, transferIndex" }
START@{shape: start}
end
class NOTE_START_BLOCK hidden
Expand All @@ -16,21 +16,22 @@ flowchart TD
REMOVE_ELAB_REQUESTS["Rimuovi tutte le richieste di elaborazione correnti"] -->
CLASSIFY_IUV

subgraph CLASSIFY_IUV["Aggiorna stato riconciliazione IUV"]
subgraph CLASSIFY_IUV["Aggiorna stato riconciliazione Transfer"]
direction TB
DUMMY:::hidden --> FIND_RT
linkStyle 2 display:none

FIND_RT@{shape: database, label: "Cerca ricevuta IUV"} -->
FIND_RT_NOTIFIED@{shape: database, label: "Cerca notifica IUV"} -->
FIND_REND@{shape: database, label: "Cerca rendicontazione IUV"} -->
FIND_RT@{shape: database, label: "Cerca ricevuta Transfer"} -->
FIND_RT_NOTIFIED@{shape: database, label: "Cerca notifica Transfer"} -->
FIND_REND@{shape: database, label: "Cerca rendicontazione Transfer"} -->
FIND_TES_IUF@{shape: database, label: "Cerca tesoreria IUF"} -->
FIND_TES_IUV@{shape: database, label: "Cerca tesoreria IUV"} -->
CLASSIFY["Determina etichette"] -->
DELETE_PREVIOUS@{shape: database, label: "Delete precedenti classificazioni IUV<BR />(<> 'DOPPI')"} -->
INSERT_NEW@{shape: database, label: "Insert classificazioni IUV"} -->
UPDATE_IUV@{shape: database, label: "Aggiorna rata (IUF, IUR, stato)"}
DELETE_PREVIOUS@{shape: database, label: "Delete precedenti classificazioni Transfer<BR />(<> 'DOPPI')"} -->
INSERT_NEW@{shape: database, label: "Insert classificazioni Transfer"} -->
UPDATE_IUV@{shape: database, label: "Aggiorna transfer e rata (IUF, stato)"}

style FIND_TES_IUV color:red;
end

CLASSIFY_IUV --> END@{shape: stop}
Expand All @@ -41,9 +42,9 @@ flowchart TD
subgraph SIGNALS_BLOCK
direction LR

subgraph SIGNAL_IUV_BLOCK["Evento Classifica IUV"]
subgraph SIGNAL_IUV_BLOCK["Evento Classifica Transfer"]
direction LR
DESCRIPTION_SIGNAL_IUV@{ shape: braces, label: "Input: IUV" }
DESCRIPTION_SIGNAL_IUV@{ shape: braces, label: "Input: orgId, IUV, IUR, transferIndex" }
SIGNAL_IUV@{ shape: bolt } -->
ADD_SIGNAL_IUV["Aggiungi richiesta elaborazione"] -->
SIGNAL_IUV_END@{ shape: "stop" }
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 34a19f4

Please sign in to comment.