Update Sample17
This commit is contained in:
parent
dc0a68c37d
commit
75e89b6593
|
|
@ -1,8 +1,10 @@
|
|||
using Elsa.Activities.Console.Activities;
|
||||
using Elsa.Activities.Primitives;
|
||||
using Elsa.Expressions;
|
||||
using Elsa.Services;
|
||||
using Elsa.Services.Models;
|
||||
using Sample17.Activities;
|
||||
using Sample17.Models;
|
||||
|
||||
namespace Sample17
|
||||
{
|
||||
|
|
@ -14,7 +16,12 @@ namespace Sample17
|
|||
.StartWith<WriteLine>(x => x.TextExpression = new LiteralExpression("Enter a title"))
|
||||
.Then<ReadLine>(id: "DocumentTitleInput")
|
||||
.Then<CreateDocument>(x => x.TitleExpression = new JavaScriptExpression<string>("DocumentTitleInput.Input"), id: "CreateDocument")
|
||||
.Then<WriteLine>(x => x.TextExpression = new JavaScriptExpression<string>("`A new document was created with title \"${CreateDocument.Document.Title}\"`"));
|
||||
.Then<SetVariable>(x =>
|
||||
{
|
||||
x.VariableName = "Document";
|
||||
x.ValueExpression = new JavaScriptExpression<Document>("CreateDocument.Document");
|
||||
})
|
||||
.Then<WriteLine>(x => x.TextExpression = new JavaScriptExpression<string>("`A new document was created with title \"${Document.Title}\"`"));
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue