mvSapphire / PowerPipe

A library for .NET that uses a fluent interface to construct advanced workflows with ease.
MIT License
188 stars 10 forks source link

Incorrect OnError behavior for nested pipelines #57

Closed mvSapphire closed 2 months ago

mvSapphire commented 5 months ago

For example:

var builder = new PipelineBuilder<SamplePipelineContext, SamplePipelineResult>(_pipelineStepFactory, context)
         .If(SampleParallelStep1ExecutionAllowed, b => b
              .Add<SampleStep1>()
              .Add<SampleStep2>()
              .Add<SampleStep3>()
              .Add<SampleStep4>()) // throw
         .OnError(PipelineStepErrorHandling.Suppress)
         .Add<SampleStep5>();

Errors thrown inside nested pipelines are not handled correctly.

Expected behavior: Errors thrown inside nested pipelines should be handled correctly by themselves or by parent steps