canna-oss
Event Storming Board
Domain Event
Command
Aggregate
Policy
Ext. System
Read Model
Hotspot
Fluxo 1 — Onboarding de Membro
Gatilho
ext. system
Médico Prescritor
→
command
Submit Medical Record
→
aggregate
Member
→
event
Medical Record Submitted
Consentimento
policy
→ Request Consent
→
command
Record Consent
→
aggregate
Member
→
event
Consent Recorded
→
event
Member Activated
Hotspots
hotspot
Receita digital vs papel?
hotspot
Validade prescrição: 30 dias?
hotspot
Menores de idade?
Fluxo 2 — Ciclo de Cultivo
Início
command
Start Cultivation Batch
→
aggregate
Cultivation Batch
→
event
Cultivation Batch Started
→
command
Register Plant
→
event
Plant Registered
Stage Loop
command
Advance Plant Stage
→
aggregate
Plant
→
event
Plant Stage Advanced
command
Destroy Plant
event
Plant Destroyed
Colheita
command
Record Harvest
→
aggregate
Cultivation Batch
→
event
Harvest Recorded
Policy →
policy
→ Create Processing Run
policy
→ CPC 29 Valuation
Fluxo 3 — Processamento & Laboratório
Processamento
command
Create Processing Run
→
aggregate
Harvest Batch
→
event
Processing Run Completed
Laboratório
command
Submit Lab Sample
→
ext. system
Laboratório Analítico
→
event
Lab Sample Submitted
command
Approve Lab Sample
command
Reject Lab Sample
event
Lab Sample Approved
event
Lab Sample Rejected
Fluxo 4 — Inventário
Lote
policy
→ Quarantine Lot
→
aggregate
Inventory Lot
→
event
Lot Quarantined
→
command
Release Lot
→
read model
COA Aprovado?
→
event
Lot Released
Fluxo 5 — Dispensação
Verificações
read model
Member Quota
read model
Valid Prescription
read model
Available Lots
→
command
Record Dispensation
→
aggregate
Dispensation
→
event
Dispensation Recorded
SNGPC
policy
→ Sync vs Async
→
event
SNGPC XML Generated
→
ext. system
ANVISA SNGPC API
event
SNGPC XML Sent ✓
event
SNGPC XML Failed ✗
Fluxo 6 — Compliance & Relatórios
Calendário
policy
→ Generate KPI Report
policy
→ BSPO Trimestral
policy
→ BSPO Anual
→
aggregate
Compliance Report
→
event
KPI Report Generated
event
BSPO Generated
event
DRE Generated
Fluxo 7 — LGPD: Anonimização de Membro
Requisição
command
Request Anonymization
→
read model
Dispensações Pendentes?
→
command
Execute Crypto Deletion
→
aggregate
Member
→
event
Member Anonymized
Policy →
policy
→ LGPD Compliance Entry
policy
→ Audit Entry Preserved
×