Skip to content

Commit

Permalink
modify log
Browse files Browse the repository at this point in the history
Signed-off-by: MregXN <mregxn@gmail.com>
  • Loading branch information
MregXN committed Dec 9, 2023
1 parent 1578c53 commit c08017e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
6 changes: 6 additions & 0 deletions examples/Workflow/WorkflowFanOutFanIn/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@

using (daprClient)
{
Console.WriteLine($"Workflow Started.");
await daprClient.WaitForSidecarAsync();

string instanceId = $"demo-workflow-{Guid.NewGuid().ToString()[..8]}";
Expand All @@ -51,4 +52,9 @@ await daprClient.StartWorkflowAsync(
await daprClient.WaitForWorkflowCompletionAsync(
workflowComponent: DaprWorkflowComponent,
instanceId: instanceId);

GetWorkflowResponse state = await daprClient.GetWorkflowAsync(
instanceId: instanceId,
workflowComponent: DaprWorkflowComponent);
Console.WriteLine($"Workflow state: {state.RuntimeStatus}");
}
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,11 @@ public class DemoWorkflow : Workflow<string, string>
{
public override async Task<string> RunAsync(WorkflowContext context, string input)
{
Console.WriteLine("Workflow Started.");

Task t1 = context.CallActivityAsync(nameof(NotifyActivity), "calling task 1 ...");
Task t2 = context.CallActivityAsync(nameof(NotifyActivity), "calling task 2 ...");
Task t3 = context.CallActivityAsync(nameof(NotifyActivity), "calling task 3 ...");
await Task.WhenAll(t1, t2, t3);

Console.WriteLine("Workflow Completed.");
return "Workflow Completed.";
}
}
Expand Down

0 comments on commit c08017e

Please sign in to comment.