vlingo / xoom-common

The VLINGO XOOM platform SDK common tools shared across various projects.
Other
16 stars 10 forks source link

Do not execute the following success steps once pipeline has failed #45

Closed jakzal closed 3 years ago

jakzal commented 3 years ago

Following @VaughnVernon's comment: https://github.com/vlingo/xoom-common/pull/44#issuecomment-898066969

@jakzal I think that the original intention was that a failure handled by an otherwise() would terminate the pipeline. However, I don't disagree that it should be possible to continue the pipeline if otherwise() actually recovers the failure.

Given that preexisting pipelines terminate on failure should (or would hopefully) not cause problems because most/all purposely short circuit by producing a final outcome. For example, 404 or 500 on some HTTP response.

I agree we shouldn't continue the pipeline once a failure occurs, but the following otherwise* functions and consumers should still be executed.

jakzal commented 3 years ago

After discussing this offline, we agreed otherwise* should recover from failure and make the pipeline continue with any future andThen* steps.