evenements-de-l-operation
Événement (AsyncAPI) — version 0.2.0. Producteur : operations. Consommateurs déclarés : conformite, entreprise, relation-tiers, instruments.
LES FAITS DU CYCLE DE VIE : ce qui est arrivé à une opération, sans rien demander à personne. C’est la différence exacte avec les demandes d’exécution — celles-ci DEMANDENT et emportent obligation de traitement, celles-là INFORMENT et n’engagent aucun destinataire à agir. CES ÉVÉNEMENTS NE SONT PAS COMPTABILISABLES : ils décrivent un cycle opérationnel, jamais un fait définitif au sens comptable — la tenue de compte ne les consomme pas, elle attend les comptes rendus produits par ceux qui constatent.
La spécification
Section intitulée « La spécification »asyncapi: 3.0.0info: title: operations — les événements de l'opération version: 0.2.0 x-ruptures: - version: 0.2.0 rupture: "propriété retirée : tenant" motif: >- Isolation forte par tenant — aucun identifiant de tenant n'est transporté ; l'appartenance est celle de l'installation (précédent instruments 0.4.0). description: >- LES FAITS DU CYCLE DE VIE : ce qui est arrivé à une opération, sans rien demander à personne. C'est la différence exacte avec les demandes d'exécution — celles-ci DEMANDENT et emportent obligation de traitement, celles-là INFORMENT et n'engagent aucun destinataire à agir. CES ÉVÉNEMENTS NE SONT PAS COMPTABILISABLES : ils décrivent un cycle opérationnel, jamais un fait définitif au sens comptable — la tenue de compte ne les consomme pas, elle attend les comptes rendus produits par ceux qui constatent. x-producteurs: - operations x-consommateurs: - conformite - entreprise - relation-tiers - instrumentsdefaultContentType: application/json
channels:
cycleDeVie: address: operations.cycle-de-vie description: >- UN CANAL UNIQUE pour les faits d'opération, filtré par les consommateurs sur le type d'événement. Contrairement aux demandes, ces faits n'emportent aucune obligation de traitement : un canal unique tient la réconciliation « qui a vu quoi » d'un seul endroit. messages: operationInitiee: { $ref: '#/components/messages/operationInitiee' } operationRecevable: { $ref: '#/components/messages/operationRecevable' } operationRejetee: { $ref: '#/components/messages/operationRejetee' } operationGarnie: { $ref: '#/components/messages/operationGarnie' } operationValidee: { $ref: '#/components/messages/operationValidee' } operationSuspendue: { $ref: '#/components/messages/operationSuspendue' } operationReprise: { $ref: '#/components/messages/operationReprise' } operationAnnulee: { $ref: '#/components/messages/operationAnnulee' } operationACompenser: { $ref: '#/components/messages/operationACompenser' } operationCompensee: { $ref: '#/components/messages/operationCompensee' } operationClose: { $ref: '#/components/messages/operationClose' }
masse: address: operations.masse description: >- Les faits d'un traitement de masse : le lancement d'une déclinaison et le rapprochement d'un lot. Ils portent des COMPTEURS, jamais la liste de ce qu'ils ont traité. messages: declinaisonLancee: { $ref: '#/components/messages/declinaisonLancee' } lotRapproche: { $ref: '#/components/messages/lotRapproche' }
retourAuReferentiel: address: operations.denouement-declinaison description: >- Ce qu'une déclinaison rend au référentiel des instruments. DES TOTAUX, JAMAIS UNE DONNÉE DE PORTEUR : instruments ne voit ni porteur, ni compte, ni position. messages: denouementAgrege: { $ref: '#/components/messages/denouementAgrege' }
operations:
publierLeCycleDeVie: action: send channel: { $ref: '#/channels/cycleDeVie' } summary: Les onze faits du cycle d'une opération individuelle. messages: - $ref: '#/channels/cycleDeVie/messages/operationInitiee' - $ref: '#/channels/cycleDeVie/messages/operationRecevable' - $ref: '#/channels/cycleDeVie/messages/operationRejetee' - $ref: '#/channels/cycleDeVie/messages/operationGarnie' - $ref: '#/channels/cycleDeVie/messages/operationValidee' - $ref: '#/channels/cycleDeVie/messages/operationSuspendue' - $ref: '#/channels/cycleDeVie/messages/operationReprise' - $ref: '#/channels/cycleDeVie/messages/operationAnnulee' - $ref: '#/channels/cycleDeVie/messages/operationACompenser' - $ref: '#/channels/cycleDeVie/messages/operationCompensee' - $ref: '#/channels/cycleDeVie/messages/operationClose'
publierLesFaitsDeMasse: action: send channel: { $ref: '#/channels/masse' } summary: Le lancement d'une déclinaison et le rapprochement d'un lot. messages: - $ref: '#/channels/masse/messages/declinaisonLancee' - $ref: '#/channels/masse/messages/lotRapproche'
publierLeDenouementAgrege: action: send channel: { $ref: '#/channels/retourAuReferentiel' } summary: Rendre au référentiel des instruments le dénouement d'une déclinaison. messages: - $ref: '#/channels/retourAuReferentiel/messages/denouementAgrege'
components:
messages:
operationInitiee: name: operation-initiee title: Opération initiée summary: Une demande ou un fait déclencheur a créé une opération. contentType: application/json payload: { $ref: '#/components/schemas/faitDOperation' }
operationRecevable: name: operation-recevable title: Opération recevable summary: Les contrôles permettent le garnissage ou la validation. contentType: application/json payload: { $ref: '#/components/schemas/faitDOperation' }
operationRejetee: name: operation-rejetee title: Opération rejetée summary: >- La demande est irrecevable dans le contexte évalué. Elle ne se rouvre pas : une demande rejetée se REFORMULE. contentType: application/json payload: { $ref: '#/components/schemas/faitMotive' }
operationGarnie: name: operation-garnie title: Opération garnie summary: Les instructions et les jambes sont complètes et contrôlées. contentType: application/json payload: { $ref: '#/components/schemas/faitDOperation' }
operationValidee: name: operation-validee title: Opération validée summary: >- LE POINT DE NON-RETOUR : le contexte et les instructions sont figés. Au-delà, rien ne se modifie, tout se compense. contentType: application/json payload: { $ref: '#/components/schemas/faitDOperation' }
operationSuspendue: name: operation-suspendue title: Opération suspendue summary: >- Une décision bloque la poursuite. POUR L'ORIGINE CONFORMITÉ, LE MESSAGE NE PORTE QUE L'ORIGINE : ni motif, ni référence de mesure, ni dossier — le cloisonnement vaut aussi dans le bus. contentType: application/json payload: { $ref: '#/components/schemas/faitDeSuspension' }
operationReprise: name: operation-reprise title: Opération reprise summary: La suspension est levée ET les règles ont été réévaluées. contentType: application/json payload: { $ref: '#/components/schemas/faitDOperation' }
operationAnnulee: name: operation-annulee title: Opération annulée summary: L'opération sort du cycle sans effets. Distinct de la contrepassation. contentType: application/json payload: { $ref: '#/components/schemas/faitMotive' }
operationACompenser: name: operation-a-compenser title: Opération à compenser summary: Un effet exécuté exige une correction ; un dossier est ouvert. contentType: application/json payload: { $ref: '#/components/schemas/faitDeCorrection' }
operationCompensee: name: operation-compensee title: Opération compensée summary: >- Le plan de compensation a abouti. LA CAUSALITÉ EST OBLIGATOIRE sur ce fait : la chaîne d'une correction doit se remonter sans interprétation. contentType: application/json payload: { $ref: '#/components/schemas/faitDeCorrection' }
operationClose: name: operation-close title: Opération close summary: >- Tous les résultats attendus sont rapprochés ou qualifiés, et la couverture espèces est complète. FAIT TERMINAL, jamais un champ remis à faux : une opération close qui doit changer donne lieu à une opération NOUVELLE reliée par un dossier de correction. contentType: application/json payload: { $ref: '#/components/schemas/faitDOperation' }
declinaisonLancee: name: declinaison-lancee title: Déclinaison lancée summary: Une masse est partitionnée en lots rejouables ; la population est figée. contentType: application/json payload: { $ref: '#/components/schemas/faitDeDeclinaison' }
lotRapproche: name: lot-rapproche title: Lot rapproché summary: >- Tout ce qui était attendu a été traité ou qualifié — attendu = traité + en anomalie. Un lot ne se clôt pas parce qu'il n'a plus rien à faire. contentType: application/json payload: { $ref: '#/components/schemas/faitDeLot' }
denouementAgrege: name: denouement-agrege title: Dénouement agrégé d'une déclinaison summary: >- Ce que la déclinaison rend au référentiel des instruments. contentType: application/json payload: { $ref: '#/components/schemas/denouementAgrege' }
schemas:
enveloppe: type: object required: [evenementId, typeEvenement, versionContrat, dateEvenement, producteur] properties: evenementId: type: string description: >- Identifiant unique — la clé d'idempotence des consommateurs. Livraison AU MOINS UNE FOIS. typeEvenement: { type: string } versionContrat: { type: string } dateEvenement: { type: string, format: date-time } producteur: { type: string, const: operations } sequenceEntite: type: integer description: Par entité et par producteur — jamais entre producteurs. causaliteReference: type: string description: >- Facultative en général, OBLIGATOIRE sur tout fait de compensation.
faitDOperation: allOf: - $ref: '#/components/schemas/enveloppe' - type: object required: [operationRef, categorie, initiateur, etat] properties: operationRef: { type: string } operationCollectiveRef: { type: string } categorie: type: string description: L'axe de l'effet économique. initiateur: type: string description: L'axe de l'initiateur. Les deux axes sont orthogonaux. etat: { type: string } epargnantRef: { type: string } entrepriseRef: { type: string } dateFaitGenerateur: { type: string, format: date } dateValeur: { type: string, format: date }
faitMotive: allOf: - $ref: '#/components/schemas/faitDOperation' - type: object required: [motif] properties: motif: type: string description: >- CODIFIÉ, jamais un texte libre : un rejet ou une annulation ne se raconte pas, il se classe. Aucune donnée sensible.
faitDeSuspension: allOf: - $ref: '#/components/schemas/faitDOperation' - type: object required: [origine] properties: origine: type: string enum: [CONFORMITE, OPERATIONNELLE] motif: type: string description: >- PRÉSENT SEULEMENT pour l'origine OPERATIONNELLE. Pour l'origine CONFORMITE, le champ est ABSENT du message — pas vide : absent.
faitDeCorrection: allOf: - $ref: '#/components/schemas/faitDOperation' - type: object required: [dossierRef, nature] properties: dossierRef: { type: string } nature: type: string enum: [ANNULATION, COMPENSATION, REGULARISATION, CONTREPASSATION] operationsNeutralisees: type: array items: { type: string } description: >- Toute compensation CITE l'opération et les effets qu'elle neutralise, et ne supprime jamais la trace du fait initial.
faitDeDeclinaison: allOf: - $ref: '#/components/schemas/enveloppe' - type: object required: [operationCollectiveRef, attendu, nombreLots] properties: operationCollectiveRef: { type: string } attendu: { type: integer } nombreLots: { type: integer } populationFigeeLe: { type: string, format: date-time } casARisqueIsoles: type: integer description: Écartés du traitement automatique et versés en anomalie.
faitDeLot: allOf: - $ref: '#/components/schemas/enveloppe' - type: object required: [lotRef, attendu, traite, enAnomalie] properties: lotRef: { type: string } operationCollectiveRef: { type: string } attendu: { type: integer } traite: { type: integer } enAnomalie: { type: integer }
denouementAgrege: allOf: - $ref: '#/components/schemas/enveloppe' - type: object required: [operationCollectiveRef, instrumentRef, porteursTraites] properties: operationCollectiveRef: { type: string } instrumentRef: { type: string } evenementInstrumentRef: type: string description: >- L'événement d'instrument source. Chaque opération issue d'une déclinaison le cite. porteursTraites: { type: integer } porteursEnAnomalie: { type: integer } partsAbsorbeesUpm: { type: integer, format: int64 } partsAttribueesUpm: { type: integer, format: int64 } rompusRegleCt: { type: integer, format: int64 }