You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I came across a workflow in which we must guarantee that we never consume or release inventory.
I can try to make rules in the command handling around the quantity, but that is not enough; it requires that a given command handling enforce strong OCC with a very expected version (that is the default behavior today) or fail without retries around :wrong_expected_version failure, the client must decide if the OCC should be retry or not.
Also, this is a very similar situation to commanded/commanded#580 (comment) to some extent, where a user made a decision based on a given ETAG, which is not supported since I can not pass the expected version.
Without getting too much into solution space, which is not my intent here, ideally, I could do the following:
Such values would take (please correct me here) the above things that may be passed in the dispatch/2, primarily because Application developers may not be aware of such firm decisions critical to the business. So, dispatching the command would require a lot of care.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Context
I came across a workflow in which we must guarantee that we never consume or release inventory.
I can try to make rules in the command handling around the quantity, but that is not enough; it requires that a given command handling enforce strong OCC with a very expected version (that is the default behavior today) or fail without retries around
:wrong_expected_versionfailure, the client must decide if the OCC should be retry or not.Also, this is a very similar situation to commanded/commanded#580 (comment) to some extent, where a user made a decision based on a given ETAG, which is not supported since I can not pass the expected version.
Without getting too much into solution space, which is not my intent here, ideally, I could do the following:
Such values would take (please correct me here) the above things that may be passed in the
dispatch/2, primarily because Application developers may not be aware of such firm decisions critical to the business. So, dispatching the command would require a lot of care.References
Beta Was this translation helpful? Give feedback.
All reactions