Add a stepwise webui to allow user interact with stepwise workflow
Usage
Code
// Create a web host running on 5123 port
using Microsoft.AspNetCore.Hosting;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Hosting;
using StepWise.Core;
using StepWise.WebAPI;
var host = Host.CreateDefaultBuilder()
//.UseEnvironment("Development")
.ConfigureWebHostDefaults(webBuilder =>
{
webBuilder.UseUrls("http://localhost:5123");
})
.UseStepWiseServer()
.Build();
await host.StartAsync();
var stepWiseClient = host.Services.GetRequiredService<StepWiseClient>();
var helloWorldWorkflow = Workflow.CreateFromInstance(new HelloWorld());
var loopWorkflow = Workflow.CreateFromInstance(new Loop());
var cumulativeWorkflow = Workflow.CreateFromInstance(new Cumulative());
stepWiseClient.AddWorkflow(helloWorldWorkflow);
stepWiseClient.AddWorkflow(loopWorkflow);
stepWiseClient.AddWorkflow(cumulativeWorkflow);
stepWiseClient.AddWorkflow(Workflow.CreateFromInstance(new PrepareDinner()));
// Wait for the host to shutdown
await host.WaitForShutdownAsync();
This will start a web ui at localhost 127.0.0.1:5123
Add a stepwise webui to allow user interact with stepwise workflow
Usage
Code
This will start a web ui at
localhost 127.0.0.1:5123
Web UI