@@ -86,8 +86,7 @@ await host.RunAsync();
8686
8787``` csharp
8888using ConductorSharp .Engine .Builders .Metadata ;
89- using ConductorSharp .Engine .Interface ;
90- using MediatR ;
89+ using ConductorSharp .Engine ;
9190
9291public class PrepareEmailRequest : IRequest <PrepareEmailResponse >
9392{
@@ -103,7 +102,7 @@ public class PrepareEmailResponse
103102[OriginalName (" EMAIL_prepare" )]
104103public class PrepareEmailHandler : TaskRequestHandler <PrepareEmailRequest , PrepareEmailResponse >
105104{
106- public async Task <PrepareEmailResponse > Handle (PrepareEmailRequest request , CancellationToken cancellationToken )
105+ public override async Task <PrepareEmailResponse > Handle (PrepareEmailRequest request , CancellationToken cancellationToken )
107106 {
108107 var body = $" Hello {request .CustomerName } at {request .Address }!" ;
109108 return new PrepareEmailResponse { EmailBody = body };
@@ -135,8 +134,8 @@ public class SendNotificationWorkflow : Workflow<SendNotificationWorkflow, SendN
135134 WorkflowDefinitionBuilder <SendNotificationWorkflow , SendNotificationInput , SendNotificationOutput > builder
136135 ) : base (builder ) { }
137136
138- public CustomerGetV1 GetCustomer { get ; set ; }
139- public EmailPrepareV1 PrepareEmail { get ; set ; }
137+ public GetCustomerHandler GetCustomer { get ; set ; }
138+ public PrepareEmailHandler PrepareEmail { get ; set ; }
140139
141140 public override void BuildDefinition ()
142141 {
@@ -175,8 +174,8 @@ public class MyWorkflow : Workflow<MyWorkflow, MyWorkflowInput, MyWorkflowOutput
175174 : base (builder ) { }
176175
177176 // Task properties - these become task references in the workflow
178- public SomeTaskV1 FirstTask { get ; set ; }
179- public AnotherTaskV1 SecondTask { get ; set ; }
177+ public SomeTaskHandler FirstTask { get ; set ; }
178+ public AnotherTaskHandler SecondTask { get ; set ; }
180179
181180 public override void BuildDefinition ()
182181 {
@@ -729,7 +728,7 @@ builder.Services.AddHealthChecks()
729728Access workflow/task metadata in handlers:
730729
731730``` csharp
732- public class MyHandler : ITaskRequestHandler <MyRequest , MyResponse >
731+ public class MyHandler : TaskRequestHandler <MyRequest , MyResponse >
733732{
734733 private readonly ConductorSharpExecutionContext _context ;
735734
@@ -738,7 +737,7 @@ public class MyHandler : ITaskRequestHandler<MyRequest, MyResponse>
738737 _context = context ;
739738 }
740739
741- public async Task <MyResponse > Handle (MyRequest request , CancellationToken cancellationToken )
740+ public override async Task <MyResponse > Handle (MyRequest request , CancellationToken cancellationToken )
742741 {
743742 var workflowId = _context .WorkflowId ;
744743 var taskId = _context .TaskId ;
0 commit comments