using System; using System.Net; using Elsa.Activities.Http.Activities; using Elsa.Expressions; using Elsa.Services; using Elsa.Services.Models; namespace Sample06 { public class HelloWorldWorkflow : IWorkflow { public void Build(IWorkflowBuilder builder) { builder .StartWith( activity => activity.Path = new Uri("/hello-world", UriKind.Relative) ) .Then( activity => { activity.Content = new LiteralExpression("

Hello World!

Elsa says hi :)

"); activity.ContentType = "text/html"; activity.StatusCode = HttpStatusCode.OK; activity.ResponseHeaders = new LiteralExpression("X-Powered-By=Elsa Workflows"); } ); } } }