Add comments to Program

Signed-off-by: Marc Duiker <marcduiker@users.noreply.github.com>
This commit is contained in:
Marc Duiker 2025-04-22 09:52:44 +02:00
parent db727edae6
commit 80af9f52b5
No known key found for this signature in database
GPG Key ID: 6A36EA7754473DD7
1 changed files with 4 additions and 0 deletions

View File

@ -3,6 +3,8 @@ using Basic.Activities;
using Dapr.Workflow;
var builder = WebApplication.CreateBuilder(args);
// Dapr Workflows and Activities need to be registered in the DI container otherwise
// the Dapr runtime does not know this application contains workflows and activities.
builder.Services.AddDaprWorkflow(options =>
{
options.RegisterWorkflow<BasicWorkflow>();
@ -15,6 +17,8 @@ app.MapPost("/start/{input}", async (
string input,
DaprWorkflowClient workflowClient) =>
{
/// The DaprWorkflowClient is the API to manage workflows.
/// Here it is used to schedule a new workflow instance.
var instanceId = await workflowClient.ScheduleNewWorkflowAsync(
name: nameof(BasicWorkflow),
input: input);