Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat(order): safer & automatic transition of transactions #298

@abruere

Description

@abruere

Currently, transactions need to be manually updated when completing (paying) an order.

Order completion and transitions applied to its transactions should belong to the same database transaction, as mentioned before:


What if the /order-moves request fails after transitions have been applied to transactions and we have an inconsistent state as a result?
I asked about a more integrated sequence on slack but maybe we didn’t spare enough time to think about this.

I don’t promote API complexity, but here we could help Order API user to feel safer and have less work to do to add transitions to every single transaction. Extra parameters might be worth it.

What about some utility parameter (like transactionTransitionName, set to a valid transition name) in Order moves API that could automatically add transition to all transactions given transactions transactionIdsInTransition, in a Postgres transaction.

It’s a feature so it’s not required to include such a change in this PR if you don’t have time. This could also make an issue and a PR on its own.

Originally posted by @abruere in #297

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions