> For the complete documentation index, see [llms.txt](https://docs.portainer.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.portainer.io/portainer-documentation/sts/user/app-delivery/workflows/manage-a-workflow.md).

# Manage a workflow

The workflow detail page gives you a live view of a workflow's health, the git sources and files it draws from, the stacks it manages, and the environments those stacks are deployed to.

To manage a GitOps workflow, in the left-hand menu select **Workflows**, then click into the workflow you would like to manage.

### Edit a workflow

To edit a workflow, from the workflow details view, select **Edit**. This returns you to the [workflow creation steps](/portainer-documentation/sts/user/app-delivery/workflows/add-a-new-workflow.md) with your preconfigured values, allowing changes to any field.

<figure><img src="https://1210853305-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FNaHIkLFUk78GrFLS4raF%2Fuploads%2FKKk0hn0YEY1euMvhHgPF%2F3.0-manage-a-workflow.gif?alt=media&amp;token=3caa0dd0-4161-49fc-a8a2-09270a0edc01" alt=""><figcaption></figcaption></figure>

To configure settings of your created stack, from the workflow details view, click the stack name to be taken to the [Edit Edge stack](/portainer-documentation/sts/user/edge/stacks.md) view.

### Reconciliation engine status view

Workflows using the [reconciliation engine](/portainer-documentation/sts/user/app-delivery/workflows/add-a-new-workflow.md#reconciliation-engine) show an **Environments** table that reports what each environment applied and whether it matches the source.

#### Environment table

Click a workflow and scroll to the bottom of the page to view the environments table. The table lists one row per environment per artifact. When a workflow has more than one artifact, an **Artifact** column appears to identify which deployment each row belongs to.

| Column          | Description                                                                                                                                                                                                         |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Environment** | The environment name. Click to open the environment dashboard.                                                                                                                                                      |
| **Status**      | The current reconciliation status. A **Unreachable** badge appears alongside the status when the environment has not checked in recently.                                                                           |
| **Revision**    | The short Git commit hash of the source revision this environment last applied.                                                                                                                                     |
| **Resources**   | The number of Kubernetes resources the deployment declares. Click to open the deployment resources list.                                                                                                            |
| **Details**     | A message describing the environment's status, and the number of resources that have drifted from the source. Click to expand, or click the drift count to see exactly which fields changed and in which direction. |

**Drift details**

Click the drift count for any row to open a modal showing which resources drifted and what changed. Each drifted resource shows the fields that differ, with the source-declared value and the current cluster value. Secrets are masked before the report is built and are safe to display.

Drift entries can show one of the following operation types:

| Operation   | Meaning                                                                          |
| ----------- | -------------------------------------------------------------------------------- |
| `add`       | The field is in the source but not set on the cluster.                           |
| `remove`    | The field is set on the cluster but no longer declared in the source.            |
| `replace`   | The field differs — source value → cluster value.                                |
| `unmanaged` | The field is on the cluster but owned by another manager; re-applying leaves it. |
| `missing`   | The entire resource is in the source but not on the cluster.                     |

#### Reconcile now

The **Reconcile** button, available on the workflow's row in the Workflows list and on its detail header, asks the workflow to apply immediately rather than waiting for the next reconcile interval. Use this to push a source change without waiting, or to manually correct drift when drift detection is set to **Report drift** rather than **Reconcile drift**.

{% hint style="info" %}
Reconcile now triggers a re-apply on all environments at their next check-in. It does not wait for confirmation that the apply completed - use the **Refresh** button on the Environments table to re-read what each environment has reported after a reconcile.
{% endhint %}

### Migrate to the reconciliation engine

A workflow that was created with the Edge stack engine can be migrated to the reconciliation engine by editing it and switching the engine selector to **Reconciliation**.

{% hint style="warning" %}
Migration is one-way and cannot be undone. Once saved on the reconciliation engine, the workflow cannot be switched back to Edge stacks.
{% endhint %}

When you save a workflow that has been switched to Reconciliation:

* The workflow's Edge stacks are removed from Portainer.
* What the Edge stacks deployed **keeps running** on the cluster - the reconciliation engine adopts the existing resources using the same field manager (`portainer`), so the first reconcile updates in place without deleting and recreating anything.
* Environments that were unreachable during the migration are still notified to drop the old Edge stack when they come back online.

{% hint style="info" %}
Saving migrates this workflow to the reconciliation engine and removes its Edge stacks. What they deployed keeps running, and this cannot be undone.
{% endhint %}

### Delete a workflow

{% hint style="info" %}
Only administrators and edge administrators can delete a workflow.
{% endhint %}

To delete a workflow, from the workflow details view, click **Delete.** You will then be asked to choose what happens to the stacks and resources it has already deployed. Choose between the following:

**Detach (default):**\
Removes the workflow record from Portainer but leaves all deployed stacks and resources running exactly as they are, no longer linked to any GitOps workflow. Choose this when you want to take manual control of the resources without interrupting live workloads.

{% hint style="info" %}
Workflows using the reconciliation engine cannot be detached - only destroyed. Because the reconciliation engine manages resources directly rather than through named Edge stacks, there is no intermediate state to hand off to.
{% endhint %}

**Destroy:**\
Removes the workflow and deletes all resources it has deployed across every artifact and target environment. This cannot be undone. Choose this only when you want the deployed workloads permanently removed.

To confirm your selection, select **Detach** or **Destroy**.

<figure><img src="https://content.gitbook.com/content/NaHIkLFUk78GrFLS4raF/blobs/5r7oOxOxRjbCsCrv07Rz/2.44-delete-workflow.png" alt=""><figcaption></figcaption></figure>
