Table of Contents

Interface IWorkflowMiddlewarePipeline

Namespace
WorkflowForge.Abstractions
Assembly
WorkflowForge.dll

Provides methods for building the middleware pipeline and operation chain. This interface represents the builder pattern for constructing workflow execution pipelines.

public interface IWorkflowMiddlewarePipeline

Remarks

This interface follows the Interface Segregation Principle (ISP), providing only pipeline-building members. Code that only needs to add operations or middleware can depend on this interface rather than the full IWorkflowFoundry.

Methods

AddMiddleware(IWorkflowOperationMiddleware)

Adds middleware to the execution pipeline. Middleware wraps operations in a Russian Doll pattern (reverse order execution). First middleware added = outermost layer of the pipeline. The foundry does not take ownership: disposing it does not dispose the middleware.

void AddMiddleware(IWorkflowOperationMiddleware middleware)

Parameters

middleware IWorkflowOperationMiddleware

The middleware to add.

Exceptions

ArgumentNullException

Thrown when middleware is null.

ObjectDisposedException

Thrown when the foundry has been disposed.

AddMiddlewares(IEnumerable<IWorkflowOperationMiddleware>)

Adds multiple middleware components to the execution pipeline. Middleware wraps operations in a Russian Doll pattern (reverse order execution). First middleware added = outermost layer of the pipeline. The foundry does not take ownership: disposing it does not dispose the middleware.

void AddMiddlewares(IEnumerable<IWorkflowOperationMiddleware> middlewares)

Parameters

middlewares IEnumerable<IWorkflowOperationMiddleware>

The middleware components to add.

Exceptions

ArgumentNullException

Thrown when middlewares is null.

ObjectDisposedException

Thrown when the foundry has been disposed.

AddOperation(IWorkflowOperation)

Adds an operation to be executed in this foundry. Operations are executed in the order they are added. The foundry does not take ownership: disposing it does not dispose the operation.

void AddOperation(IWorkflowOperation operation)

Parameters

operation IWorkflowOperation

The operation to add.

Exceptions

ArgumentNullException

Thrown when operation is null.

ObjectDisposedException

Thrown when the foundry has been disposed.