workflow-core icon indicating copy to clipboard operation
workflow-core copied to clipboard

Output operation is missing a context parameter

Open cjundt opened this issue 2 years ago • 0 comments

There is no way to get context information when setting output data on a step setup. This is especially required in the context of a loop like ForEach step. For instance :

builder
    .StartWith<SayHello>()
    .ForEach(data => new List<int> { 0, 1, 2, 3, 4 })
        .Do(x => x
            .StartWith<DisplayContext>()
            .Output( (step, data, context) => data.Items[context.Item] = step.Return )
            .Then<DoSomething>())
    .Then<SayGoodbye>();

cjundt avatar Feb 24 '23 14:02 cjundt