> For the complete documentation index, see [llms.txt](https://docs.wem.io/platform/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.wem.io/platform/wemmodeler/flowcharts/save-and-discard.md).

# Save and Discard

![](https://1449034948-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-L_NpOsk0sjotPXNy29Q%2Fuploads%2Fosfh45vhmCfrNLV562bm%2Ftransaction-commit-node.svg?alt=media\&token=1c43d63e-4124-42f1-ac33-f69db4264b4b)

### Save database changes

When the save database changes node is reached, *all* changes to *all database lists that have not yet been saved*, are saved.

This node has only 1 property, the Name. The value is set by WEM and cannot be changed by the user. The value is `Save all database list changes`.

The save node has the following exits:

* `Changes saved`\
  Changes are successfully save to the database&#x20;
* `Error`\
  To handle errors with a user friendly warning and continue if appropriate (note that when you do NOT connect the error exit, any error will be displayed with technically useful information during testing - and when you DO connect the error exit, you bypass the error information and are able to let the user-flow continue - errors will still be available in devops logs for kubernetes)

![](https://1449034948-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-L_NpOsk0sjotPXNy29Q%2Fuploads%2F3HFUy9YZ0PTTADodqW8x%2Ftransaction-rollback-node.svg?alt=media\&token=324375e1-8814-4239-aa5a-c00124f725ea)

### Discard database changes

When the Discard database changes node is reached, *all* changes to *all database lists that have not yet been saved*, are discarded.

This node has only 1 property, the Name. The value is set by WEM and cannot be changed by the user. The value is `Discard all database list changes`

There is only 1 exit: `Changes discarded`.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.wem.io/platform/wemmodeler/flowcharts/save-and-discard.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
