---
title: "end storage transaction · RUAL Documentation"
description: "Commits the storage transaction opened by start storage transaction and stores its result for a later retry of the same id. A RUAL storage block."
canonical: https://docs.rual.nl/block-types/storage/function_transaction_end
language: en
---

[Cluster](https://docs.rual.nl/cluster)

[Blocks](https://docs.rual.nl/block-types)

[Interfaces](https://docs.rual.nl/interfaces)

[Blueprints](https://docs.rual.nl/blueprints)

[Blueprint Language](https://docs.rual.nl/engine)

[Tutorials](https://docs.rual.nl/tutorials)

[Home automation](https://docs.rual.nl/home-automation)

[Examples](https://docs.rual.nl/examples)

[Reference](https://docs.rual.nl/reference)

[Architecture](https://docs.rual.nl/architecture)

[Troubleshooting](https://docs.rual.nl/troubleshooting)

Other

# end storage transaction

This block is part of the [`storage`](https://docs.rual.nl/block-types/storage) group and was last modified in core [`v15.0.1`](https://docs.rual.nl/core-versions/150001).

Commits the storage transaction opened by start storage transaction and stores its result for a later retry of the same id.

- flow `flow`

- transaction id `value` Leave empty to end the transaction open in this flow. A bare id names a transaction this blueprint started; the qualified `bp: : ` reference from the start block names one started elsewhere : allowed only once that run's lease has lapsed.

- result `value` Stored on the record and returned by a later start of the same id : the response a retried request should get.

- flow `flow`

- success `condition`

- transaction id `value`

- transaction `object`

- status `value`

- error `value`

Commits a storage transaction: marks it committed, stores `result` on the record (a later function_transaction_start of the same id answers already_committed with it), releases the opener's lease and keeps the journal for its retention. Without a wired transaction_id it ends the transaction currently open in this flow; after it, writes in this flow are ordinary writes again. Fails with TRANSACTION_NOT_FOUND when there is none, TRANSACTION_NOT_OPEN when it already ended, TRANSACTION_NOT_OWNED when it was opened by another run whose lease is still alive (ownership is the attempt token the start block put in this flow; a wired id carries none). A wired id names a transaction this blueprint started unless it is the qualified `bp:<blueprint>:<id>` reference. `transaction` carries the record (id, status, attempts, op_count, started, ended, result). In simulation nothing is written.

A typical wiring for [end storage transaction](https://docs.rual.nl/block-types/storage/function_transaction_end): a [function trigger](https://docs.rual.nl/block-types/globals/trigger_custom_function) starts the flow; the `flow` out pin feeds [debug](https://docs.rual.nl/block-types/state%2520ui/state_debug).

[![Studio canvas example for the end storage transaction block: typical wiring for end storage transaction.](https://docs.rual.nl/canvas-examples/function_transaction_end.png)](https://docs.rual.nl/canvas-examples/function_transaction_end.png?v=3)

## Version history

Introduced in [`v15.0.1`](https://docs.rual.nl/core-versions/150001).

- [Back to `storage`](https://docs.rual.nl/block-types/storage): Return to the main group to view all sub-groups

- [Back to `storage`](https://docs.rual.nl/block-types/storage?group=storage): Return to the group to view all blocks within this group

Was this page helpful? [Tell us what to improve](https://docs.rual.nl/support) · RUAL Docs is an integral component of the [RUAL ecosystem](https://rual.nl)
