Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
abruere opened this issue May 31, 2020 · 0 comments
Open

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

abruere opened this issue May 31, 2020 · 0 comments

Comments

@abruere
Copy link
Member

abruere commented May 31, 2020

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant