26 lines
570 B
C#
26 lines
570 B
C#
using Elsa.Http;
|
|
using Elsa.Workflows;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
|
|
namespace Elsa.Samples.AspNet.Tenants;
|
|
|
|
[ApiController]
|
|
[Route("run-workflow")]
|
|
public class RunWorkflowController : ControllerBase
|
|
{
|
|
private readonly IWorkflowRunner _workflowRunner;
|
|
|
|
public RunWorkflowController(IWorkflowRunner workflowRunner)
|
|
{
|
|
_workflowRunner = workflowRunner;
|
|
}
|
|
|
|
[HttpGet]
|
|
public async Task Post()
|
|
{
|
|
await _workflowRunner.RunAsync(new WriteHttpResponse
|
|
{
|
|
Content = new("Hello ASP.NET world!")
|
|
});
|
|
}
|
|
} |