Update Sample17
This commit is contained in:
parent
75e89b6593
commit
0ea4cd3671
|
|
@ -3,5 +3,7 @@
|
|||
public class Document
|
||||
{
|
||||
public string Title { get; set; }
|
||||
|
||||
public override string ToString() => Title;
|
||||
}
|
||||
}
|
||||
|
|
@ -4,6 +4,7 @@ using Elsa.Activities.Console.Extensions;
|
|||
using Elsa.Services;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Sample17.Activities;
|
||||
using Sample17.Models;
|
||||
|
||||
namespace Sample17
|
||||
{
|
||||
|
|
@ -13,8 +14,10 @@ namespace Sample17
|
|||
{
|
||||
var services = BuildServices();
|
||||
var workflowInvoker = services.GetRequiredService<IWorkflowInvoker>();
|
||||
|
||||
await workflowInvoker.StartAsync<CreateDocumentWorkflow>();
|
||||
var workflow = await workflowInvoker.StartAsync<CreateDocumentWorkflow>();
|
||||
var document = workflow.CurrentScope.GetVariable<Document>("Document");
|
||||
|
||||
Console.WriteLine("Created document: {0}", document);
|
||||
}
|
||||
|
||||
private static IServiceProvider BuildServices()
|
||||
|
|
|
|||
Loading…
Reference in a new issue