# Visão geral

Canonical URL: https://developers.iagenify.com/pt/sdk/ref/workflow/
Language: pt

Un flusso di lavoro salvato: eseguilo, lista i suoi runs, testare un pas, cambialo, eliminalo.

Status: 5 methods · data holds the definition · update revalidates

| Chamada | Função |
| --- | --- |
| [run({ input })](/pt/sdk/ref/workflow/run) | Inizio un run e lo restitue. |
| [runts()](/pt/sdk/ref/workflow/runs) | Su historisko di run. |
| [runStep(id, context)](/pt/sdk/ref/workflow/run-step) | Corre un passo da solo, non cambiando nulla. |
| [mise a jour(patch)](/pt/sdk/ref/workflow/update) | Revalidato integralmente. |
| [destroy()](/pt/sdk/ref/workflow/destroy) | - Lo shureta. |

| Name | Type | Requirement | Description |
| --- | --- | --- | --- |
| `id` | string |  | Identificatori. |
| `data` | object |  | Definizione: `name`, `trigger`, `steps`, `edges`. |

## La sequencia usual {#lifecycle}

```javascript
const workflow = await api.workflows.create(definition);

await workflow.runStep("write", { input: { since: "2026-10-01" } });   // try one step
const run = await workflow.run({ input: { since: "2026-10-01" } });    // then the chain
await run.wait();
```

> **Testa un pas prima di diployare una catena**
>
> runStep() runs un passo con qualunque contesto che tu gli dia e cambias non run. È di gran parte più barato di scoprire al quinto passo che il secondo ha prodotto la forma errata.

## L'oggetto si aggiorna {#mutation}

`update()` sostituisce `data` sul objeto con quello che è tornato, quindi l'istanza che detiene sta a tu.

- [Definição do fluxo de trabalho](/pt/sdk/workflows): Qua una definizion detiene, e ce net.
- [Fluxo detraballo](/pt/sdk/ref/workflow-run): Agondo, aprovando, riprovando.
- [Etapas do fluxo de trabalho](/pt/sdk/workflows/steps): Os 23 tipos.

```python
workflow = api.workflows.create(definition)

workflow.run_step("write", input={"since": "2026-10-01"})   # try one step
run = workflow.run(input={"since": "2026-10-01"})           # then the chain
run.wait()
```
