workflow-core
workflow-core copied to clipboard
Output operation is missing a context parameter
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>();