# What happens if a database automation fails?

Canonical: https://uvilno.com/answers/how-do-transactional-app-automations-work
Updated: 2026-10-27

Uvilno's schema-declared database automations run in the record transaction with the same owner scope. A failed action rolls back the write and its effects. Idempotent retries avoid duplicated actions, and rules do not recursively trigger rules or execute uploaded JavaScript, external requests or role grants.

Keep a rule small enough to understand: creating a task can create a scoped activity entry and an in-app notification. Related record updates or numeric increments must reference declared fields and respect the same ownership rules. A transaction should either commit its supported effects or report a failure.

Do not infer email delivery, background scheduling or third-party fulfillment from an in-app notification. Those are different capabilities. When evolving a schema, test the rule with disposable rows and inspect the actual resulting record rather than trusting only the interface toast.

## What to verify

| Check | Published behavior | Verification |
| --- | --- | --- |
| Atomicity | The record write and supported rule actions share one transaction. | Check the created row and activity together. |
| Failure | A failed action rolls back the transaction. | Exercise a permitted failing case in a disposable project. |
| Scope | Rules cannot grant roles or run arbitrary server code. | Review the declared actions and supported field references. |

## Steps

1. Declare one bounded event and its actions.
2. Trigger it once with disposable data.
3. Inspect committed records and rule logs together.

## Editable starting brief

Plan a private tasks app where creating a task writes an activity_logs entry and an in-app notification through a declared automation. Keep every effect in the task owner's scope. Explain failure and retry states, avoid recursive rules or external requests, and provide a test checking the task and activity commit together.

## Sources

- [Uvilno public SDK documentation](https://uvilno.com/docs)
