* Fix many things. Few more samples left to fix * Fix all the samples * Introduce service configurator * Implement cache signaling and refreshing workflow registry * Add Sample16 demonstrating dashboard + workflow host combined * Bugfix where non-published versions of worklows are triggered
31 lines
896 B
C#
31 lines
896 B
C#
using System;
|
|
using System.Threading.Tasks;
|
|
using Elsa.Persistence.Memory;
|
|
using Elsa.Services;
|
|
using Microsoft.Extensions.DependencyInjection;
|
|
using Sample01.Activities;
|
|
|
|
namespace Sample01
|
|
{
|
|
/// <summary>
|
|
/// A minimal workflows program defined in code with a strongly-typed workflow class.
|
|
/// </summary>
|
|
internal static class Program
|
|
{
|
|
private static async Task Main(string[] args)
|
|
{
|
|
// Setup a service collection.
|
|
var services = new ServiceCollection()
|
|
.AddWorkflows()
|
|
.AddActivity<HelloWorld>()
|
|
.AddActivity<GoodByeWorld>()
|
|
.BuildServiceProvider();
|
|
|
|
// Invoke the workflow.
|
|
var invoker = services.GetService<IWorkflowInvoker>();
|
|
await invoker.StartAsync<HelloWorldWorkflow>();
|
|
|
|
Console.ReadLine();
|
|
}
|
|
}
|
|
} |