Composants → bpm.approvalFlow

bpm.approvalFlow

Flux de validation multi-étapes (approuvé / en attente / rejeté) : chaque approbateur peut approuver ou rejeter l'étape en cours avec un commentaire.

StableAffichage de données⏱ 2 min
S
Sophie Leroy
Demandeur
approved
K
Karim Benali
Manager
pending
C
Claire Moreau
DAF
pending

Validation du devis DV-2026-0481 : utilisez les boutons Approuver / Rejeter de l'étape en attente pour faire avancer le circuit.

Python
bpm.approval_flow(steps=[("Sophie Leroy", "Demandeur", "approved"), ("Karim Benali", "Manager", "pending"), ("Claire Moreau", "DAF", "pending")])
PropTypeDéfautRequisDescription
steps{ id, approver, role?, status, comment?, date?, avatar? }[]OuiÉtapes du circuit. status ∈ pending | approved | rejected | skipped.
onApprove(stepId: string, comment?: string) => voidNonCallback d'approbation de l'étape en attente ; affiche le bouton « Approuver ».
onReject(stepId: string, comment?: string) => voidNonCallback de rejet de l'étape en attente ; affiche le bouton « Rejeter ».
direction"horizontal" | "vertical"autoNonOrientation. Par défaut : horizontal si moins de 5 étapes, vertical sinon.
showCommentInputbooleantrueNonAffiche le champ commentaire sous l'étape en attente (transmis aux callbacks).
classNamestringNonClasses CSS additionnelles.

Exemples

bpm.approval_flow(steps=[("Sophie Leroy", "Demandeur", "approved"), ("Karim Benali", "Manager", "pending"), ("Claire Moreau", "DAF", "pending")])
bpm.approval_flow(
    steps=[
        {"id": "1", "approver": "Marie Dupont", "role": "Cheffe de projet", "status": "approved", "comment": "Budget conforme."},
        {"id": "2", "approver": "Jean Martin", "role": "Direction", "status": "rejected", "comment": "Montant à revoir."},
    ],
    direction="vertical",
)