- class simple_automation.transaction.CompletedTransaction(transaction, success, store, failure_reason=None)¶
A CompletedTransaction is a manifest of the initial and final state of an transition. Additionally, it records a success status, a changed flag to indicate that at least one action has actually been performed, as well as additional stored values defined by the specific transaction for later use.
True if the transaction result was successful.
True if the transaction did change anything.
- failure_reasonstr, optional
The failure reason that will be attached if the transaction failed.
The observed initial state.
The final state of the system. If success=False, this will be the initial state.
- extra_infodict, optional
Optional extra information given by the transaction
transaction (Transaction) – The transaction that is about to be completed.
success (bool) – True if the transaction result was successful.
store (dict) – Additional value store that can later be used by callers to retrieve additional information.
failure_reason (str, optional) – The failure reason that will be attached if the transaction failed.