elsa-workflows / elsa-core

A .NET workflows library
https://v3.elsaworkflows.io/
MIT License
6.48k stars 1.2k forks source link

[ENH] About the Elsa.Workflows.Pipelines.ActivityExecution #6095

Open zfchai opened 1 week ago

zfchai commented 1 week ago

Suggest aligning the ActiveExecution programming paradigm with the WorkflowExecution, for example:

namespace Elsa.Workflows.Pipelines.ActivityExecution;

public abstract class ActivityExecutionMiddleware : IActivityExecutionMiddleware
{
    protected ActivityExecutionMiddleware(ActivityMiddlewareDelegate next) => Next = next;
    protected ActivityMiddlewareDelegate Next { get; }
    public abstract ValueTask InvokeAsync(ActivityExecutionContext context);
}
sfmskywalker commented 3 days ago

Makes sense. Do you want to submit a PR?