Skip to main content

Workflow Button

Overview

The Workflow Button component adds a button that a user clicks to run a workflow on demand. In the component picker it's listed simply as Workflow. Use it for actions that should stay behind an explicit click — approvals, status transitions, sending a document, generating a record in another feature — instead of firing automatically on a data change.

The dropdown lists workflows with a manual trigger. Older workflows only qualify when their manual trigger is scoped to a single row; newer workflows qualify with any manual-trigger scope (their scope decides what data the run needs — see below).

Configuration

SettingDescription
WorkflowThe manual-trigger workflow this button runs.
Texto do BotãoLabel shown on the button. Falls back to "Executar" when left empty.
Ícone do BotãoIcon shown on the button: Play, Transform, Enviar, Atualizar, Confirmar, Configurar.
Mensagem de Confirmação (Opcional)When set, a confirmation dialog with this message must be accepted before the workflow runs. Leave empty to run immediately on click.
Mostrar em TabelasShows the button in table views. On by default.
Mostrar em FormuláriosShows the button in form views. Off by default.

Mostrar em Tabelas and Mostrar em Formulários only gate the Table and Form views. Every other view that can host this component — List, Kanban, Calendar, Dashboard, Kiosk, Cards, Document — always renders the button.

In different views

View(s)Display
TableSmall filled icon button in the cell. Tooltip shows Texto do Botão (or "Executar" if left empty).
FormFull-width filled button with icon and label.
List, Calendar, Dashboard, DocumentSame full-width filled button as Form — always shown, regardless of the toggles above.
Kanban, Kiosk, CardsCompact action chip with the label — always shown.

What happens on click

  1. If no workflow is selected, or the row/feature data the workflow needs isn't available, the click fails immediately with a warning — no dialog shown.
  2. For workflows that declare a scope (Genérico, Linha, Feature, Vista), the button resolves that scope first:
    • Genérico — runs with no row data. Works from any view, including dashboards.
    • Feature — collects all rows from the workflow's source feature. Works from any view.
    • Linha — needs the record the button is attached to. If the button isn't placed inside a table row or an open form (for example, on a dashboard), it stops with: "Este workflow dispara a partir de uma linha — use o botão dentro de uma linha ou formulário".
    • Vista — not supported by this button. Clicking shows: "Este workflow dispara a partir da vista — use a ação global da vista (barra de ferramentas)". Use the view's own toolbar action for view-scoped workflows instead.
  3. Only once that resolves does the confirmation dialog appear, if Mensagem de Confirmação (Opcional) is set. Declining it cancels the run — nothing else happens.
  4. Once confirmed (or immediately, if there's no confirmation message), the workflow runs and a snackbar reports the outcome ("Run iniciado." on success, an error message otherwise).

Older workflows without a scope always require the button to be on a row — they fail with "Dados da linha não encontrados" instead of the Linha-scope message above. They also don't report through a snackbar: a small progress dialog opens and closes itself automatically once the run finishes successfully.

Tips

  • If the button seems to do nothing, check that the selected workflow's scope matches where you placed the button — a Linha-scoped workflow needs to live inside a row or form, not on a dashboard.
  • Use Mensagem de Confirmação (Opcional) for destructive or hard-to-reverse actions (deletions, sending emails, external API calls).
  • If no workflow appears in the Workflow dropdown, the workspace has no eligible manual-trigger workflow yet — create one first in the Workflows admin section.