<a id="exp-changes-tasks"></a>

# Changes, tasks

<!-- @artefact workshop state management -->

A *change* is a core concept of the workshop state management system.
Any long-running or invasive operation
(e.g., [launch](https://ubuntu.com/workshop/docs//reference/cli/workshop.md#ref-workshop-launch))
that changes the state of a workshop
is planned and applied as a change,
which consists of specific tasks
that run in a predefined order.

<!-- @artefact project -->

A *task* is a small, independent piece of logic;
it could be mounting a project directory,
running a [hook](https://ubuntu.com/workshop/docs//explanation/sdks/concepts.md#exp-sdk-hooks),
or starting a workshop container.
Most tasks are reversible.

Overall, this scheme provides granular control
over the state of a workshop;
the state management system uses it
to ensure the integrity of the workshop in the event of failure.
By default, a failed change restores the workshop
to its last operational state.

To explicitly revert to the state after the last successful launch or refresh,
use the **workshop restore** command.
It restores the container filesystem from the most recent snapshot
and resets all connections and mounts to their defaults.
Unlike the automatic rollback during a failed refresh,
**restore** is a deliberate user action
to discard all changes made to a workshop since it was last set up.

## See also

Explanation:

- [SDK hooks](https://ubuntu.com/workshop/docs//explanation/sdks/concepts.md#exp-sdk-hooks)

How-to guides:

- [How to debug issues in workshops](https://ubuntu.com/workshop/docs//how-to/fix-workshops/debug-issues.md#how-debug-issues-workshops)

Reference:

- [workshop changes](https://ubuntu.com/workshop/docs//reference/cli/workshop.md#ref-workshop-changes)
- [workshop launch](https://ubuntu.com/workshop/docs//reference/cli/workshop.md#ref-workshop-launch)
- [workshop refresh](https://ubuntu.com/workshop/docs//reference/cli/workshop.md#ref-workshop-refresh)
- [workshop restore](https://ubuntu.com/workshop/docs//reference/cli/workshop.md#ref-workshop-restore)
- [workshop tasks](https://ubuntu.com/workshop/docs//reference/cli/workshop.md#ref-workshop-tasks)
