diff --git a/EnvelopeGenerator.Application/DependencyInjection.cs b/EnvelopeGenerator.Application/DependencyInjection.cs index 35a49835..ba534ae2 100644 --- a/EnvelopeGenerator.Application/DependencyInjection.cs +++ b/EnvelopeGenerator.Application/DependencyInjection.cs @@ -61,13 +61,16 @@ public static class DependencyInjection cfg.RegisterServicesFromAssembly(Assembly.GetExecutingAssembly()); // Register SignCommand pipeline behaviors in execution order - // 1. AnnotationBehavior - Saves annotations (executes first) + // 0. EnvelopeReceiverResolutionBehavior - Resolves EnvelopeReceiver from query parameters (executes FIRST) + cfg.AddBehavior, EnvelopeReceiverResolutionBehavior>(); + + // 1. AnnotationBehavior - Saves annotations (executes second) cfg.AddBehavior, AnnotationBehavior>(); - // 2. DocStatusBehavior - Creates document status (executes second) + // 2. DocStatusBehavior - Creates document status (executes third) cfg.AddBehavior, DocStatusBehavior>(); - // 3. HistoryBehavior - Records history (executes third) + // 3. HistoryBehavior - Records history (executes fourth) cfg.AddBehavior, HistoryBehavior>(); // 4. SendSignedMailBehavior - Sends notification email (executes LAST, only if all previous succeed)