using Elsa.Activities.Console.Activities; using Elsa.Expressions; using Elsa.Services; using Elsa.Services.Models; namespace Sample13 { public class ActivityOutputWorkflow : IWorkflow { public void Build(IWorkflowBuilder builder) { builder .StartWith(x => x.TextExpression = new PlainTextExpression("Hi! What's your name?")) .Then(id: "name") .Then(x => x.TextExpression = new JavaScriptExpression("`${name.output.text}, that's a great name! Now, what's your age?`")) .Then(id: "age") .Then(x => x.TextExpression = new JavaScriptExpression("`I see! So you were born in ${getDateOfBirth(parseInt(age.output.text))}. What a year to be alive!`")); } } }