Passa al contenuto principale

Nella web UI

Lo stesso flow, avviato, approvato e ispezionato dal browser invece che dalla CLI.

Ti serve
Alla fine hai
  • un ticket avviato dalla web UI, approvato in Approvals, con il suo BPMN e i suoi artefatti.

Passi​

  1. Avvia Postgres e Redis dal compose del repository:

    docker compose -f docker/compose.yml up -d --wait
  2. Aggiungi il Runtime che li nomina, config/runtime.yaml:

    config/runtime.yaml
    apiVersion: afe.dev/v1alpha1
    kind: Runtime
    metadata:
    name: local
    spec:
    store:
    type: postgres
    dsnEnv: AFE_POSTGRES_DSN
    broker:
    type: redis
    urlEnv: AFE_REDIS_URL
  3. Compila il bundle della web UI dentro il pacchetto afe-web:

    make web
  4. Esporta il token dell'API:

    export AFE_API_TOKEN=$(openssl rand -hex 32)
  5. Servi l'API e la UI:

    afe serve -c config/ --ui
  6. Esegui un worker, in un altro terminale:

    afe worker -c config/ --dry
  7. Apri http://127.0.0.1:8765/ e accedi con il token.

  8. Apri Flows, avvia writer-reviewer, compila il form e avvia il ticket.

  9. Rispondi in Approvals. Poi leggi il diagramma BPMN e gli artefatti nella pagina del ticket.

Risoluzione dei problemi​

Sintomo: afe serve --ui fallisce con "the web UI is not built: run make web". Causa: il passo 3 è stato saltato, oppure il pacchetto afe-web non ha ancora una build. Rimedio: esegui make web dalla radice del repository, poi riavvia afe serve --ui.

Sintomo: afe serve termina con "set AFE_API_TOKEN: the server does not start without a token". Causa: il passo 4 è stato saltato in questo terminale, oppure il token è stato esportato in un'altra shell. Rimedio: esporta di nuovo AFE_API_TOKEN nella shell che esegue afe serve.

Sintomo: il browser non raggiunge 127.0.0.1:8765. Causa: Postgres o Redis non sono attivi, quindi afe serve del passo 5 non è partito. Rimedio: esegui docker compose -f docker/compose.yml ps e controlla che entrambi i servizi siano healthy.

Vedi anche​