Consulta e preenchimento do wizard¶
Ler e completar configurações da instância em GET/PATCH /gateway/api/v1/gateways/{id}/wizard, com revisionId opcional. O BFF preserva status e ajusta caminhos na resposta.
%%{init: {"theme":"base","themeVariables":{"fontFamily":"Arial, sans-serif","fontSize":"16px","lineColor":"#64748b","primaryTextColor":"#172b4d"},"flowchart":{"htmlLabels":true,"useMaxWidth":true,"nodeSpacing":28,"rankSpacing":38,"padding":14,"curve":"linear","subGraphTitleMargin":{"top":12,"bottom":16}},"sequence":{"useMaxWidth":true,"actorMargin":28,"width":145,"height":45,"diagramMarginX":32,"diagramMarginY":12,"messageMargin":24,"wrap":true,"mirrorActors":false},"themeCSS":".edgeLabel, .edgeLabel p {background-color:var(--diagram-surface)!important;color:var(--diagram-text)!important}\n.cluster rect {fill:var(--diagram-group)!important;stroke:var(--diagram-line)!important}\n.cluster-label span, .cluster-label text {color:var(--diagram-text)!important;fill:var(--diagram-text)!important}\n.flowchart-link, .actor-line {stroke:var(--diagram-line)!important}\nmarker path {fill:var(--diagram-line)!important;stroke:var(--diagram-line)!important}\n.actor {fill:var(--diagram-domain)!important;stroke:var(--diagram-domain-border)!important}\ntext.actor, .messageText, .loopText, .labelText {fill:var(--diagram-text)!important}\n.messageLine0, .messageLine1, .loopLine {stroke:var(--diagram-line)!important}\n.labelBox {fill:var(--diagram-surface)!important;stroke:var(--diagram-line)!important}\n.note {fill:var(--diagram-async)!important;stroke:var(--diagram-async-border)!important}\n.noteText {fill:var(--diagram-text)!important}\n.nodeLabel, .nodeLabel p, .nodeLabel span {color:var(--diagram-text)!important}\n.node .nodeLabel, .node .nodeLabel p {font-size:17px;font-weight:600;line-height:1.4;text-align:center}\n.nodeLabel small {display:inline-block;margin-top:4px;font-size:15px;font-weight:400;line-height:1.4;color:var(--diagram-description)!important}\ntext.actor, text.actor tspan {font-size:17px;font-weight:600}\n.node.entry rect, .node.entry polygon, .node.entry path, .node.entry circle {fill:var(--diagram-entry)!important;stroke:var(--diagram-entry-border)!important}\n.node.domain rect, .node.domain polygon, .node.domain path, .node.domain circle {fill:var(--diagram-domain)!important;stroke:var(--diagram-domain-border)!important}\n.node.security rect, .node.security polygon, .node.security path, .node.security circle {fill:var(--diagram-security)!important;stroke:var(--diagram-security-border)!important}\n.node.store rect, .node.store polygon, .node.store path, .node.store circle {fill:var(--diagram-store)!important;stroke:var(--diagram-store-border)!important}\n.node.async rect, .node.async polygon, .node.async path, .node.async circle {fill:var(--diagram-async)!important;stroke:var(--diagram-async-border)!important}\n.node.external rect, .node.external polygon, .node.external path, .node.external circle {fill:var(--diagram-external)!important;stroke:var(--diagram-external-border)!important}\n text.actor tspan, .loopText tspan, .labelText tspan, .messageText tspan, .noteText tspan {fill:var(--diagram-text)!important}\n\n"}}%%
%%{init: {"sequence":{"width":95,"actorMargin":16,"messageMargin":24,"wrap":true}}}%%
sequenceDiagram
actor A as Cliente
participant B as BFF
participant C as Core
participant M as MongoDB
participant S as Security
participant I as IP Policy
participant P as iPaaS
participant AC as Accounts
A->>B: Consultar ou preencher wizard
B->>C: GET ou PATCH + tenant
C->>M: Resolver revisão e seu wizard
opt PATCH
C->>C: Atualizar valores dos passos conhecidos
opt Wizard de upgrade
opt Passo de autenticação
C->>S: Validar valor e tipo
S-->>C: Dados
end
opt Passo de IP Policy
C->>I: Validar valor e tipo
I-->>C: Dados
end
opt Passo de conta ou ambiente
C->>AC: Obter token via adapter
AC-->>C: Token
C->>P: Validar recurso
P-->>C: Resultado
end
end
C->>M: Salvar wizard e evento no Outbox
end
C-->>B: GET 200 ou PATCH 202
B-->>A: Dados ou aceitação
Note over A,M: 202 não aguarda a configuração da instância
Resumo: O Core resolve a revisão administrativa por padrão e verifica pertencimento quando revisionId é informado. Passos conhecidos recebem valores; no upgrade, a validação depende do tipo de cada passo, sem impor a ordem do diagrama à lista de passos. O evento contém operationId e wizardId.
Resultado: GET não escreve. PATCH persiste respostas e solicita a continuação assíncrona. configured deriva dos passos do wizard e não equivale a publicado.
Alternativas relevantes: Wizard inexistente ou revisão incompatível resulta em erro. Upgrade completo ou fora de DRAFT não aceita alteração do wizard. Valores incompatíveis podem deixar passos incompletos; falhas técnicas de integrações são propagadas.
Todos os fluxos do Core · Modelo de dados · Versionamento.