Interface IWorkflowOperation<TInput, TOutput>
- Namespace
- WorkflowForge.Abstractions
- Assembly
- WorkflowForge.dll
Strongly-typed workflow operation interface for operations with known input/output types. Provides compile-time type safety for data flow between operations.
public interface IWorkflowOperation<TInput, TOutput> : IWorkflowOperation, IDisposable
Type Parameters
TInputThe type of input data this operation expects.
TOutputThe type of output data this operation produces.
- Inherited Members
- Extension Methods
Methods
ForgeAsync(TInput, IWorkflowFoundry, CancellationToken)
Forges (executes) the operation with strongly-typed input and output.
Task<TOutput> ForgeAsync(TInput inputData, IWorkflowFoundry foundry, CancellationToken cancellationToken = default)
Parameters
inputDataTInputThe typed input data for this operation.
foundryIWorkflowFoundryThe workflow foundry providing execution context and shared services.
cancellationTokenCancellationTokenThe cancellation token for cooperative cancellation.
Returns
- Task<TOutput>
A task representing the asynchronous operation with typed output data.
Exceptions
- ArgumentNullException
Thrown when foundry is null.
- ObjectDisposedException
Thrown when the operation has been disposed.
RestoreAsync(TOutput, IWorkflowFoundry, CancellationToken)
Restores (compensates) the operation's effects with typed output data.
Task RestoreAsync(TOutput outputData, IWorkflowFoundry foundry, CancellationToken cancellationToken = default)
Parameters
outputDataTOutputThe typed output data that was produced by this operation.
foundryIWorkflowFoundryThe workflow foundry providing execution context and shared services.
cancellationTokenCancellationTokenThe cancellation token for cooperative cancellation.
Returns
- Task
A task representing the asynchronous restoration.
Exceptions
- ArgumentNullException
Thrown when foundry is null.
- ObjectDisposedException
Thrown when the operation has been disposed.