mirror of https://github.com/dapr/quickstarts.git
Add comments to Program
Signed-off-by: Marc Duiker <marcduiker@users.noreply.github.com>
This commit is contained in:
parent
db727edae6
commit
80af9f52b5
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue