2019-09-15 10:16:24 +00:00
|
|
|
using System;
|
2019-07-22 16:55:02 +00:00
|
|
|
using Elsa.Activities.Console.Activities;
|
|
|
|
|
using Elsa.Activities.Timers.Activities;
|
|
|
|
|
using Elsa.Expressions;
|
|
|
|
|
using Elsa.Services;
|
|
|
|
|
using Elsa.Services.Models;
|
|
|
|
|
|
|
|
|
|
namespace Sample05
|
|
|
|
|
{
|
|
|
|
|
public class RecurringWorkflow : IWorkflow
|
|
|
|
|
{
|
|
|
|
|
public void Build(IWorkflowBuilder builder)
|
|
|
|
|
{
|
|
|
|
|
builder
|
|
|
|
|
.WithId("RecurringWorkflow")
|
|
|
|
|
.AsSingleton()
|
2019-09-17 20:53:11 +00:00
|
|
|
.StartWith<TimerEvent>(x => x.TimeoutExpression = new LiteralExpression<TimeSpan>("00:00:05"))
|
|
|
|
|
.Then<WriteLine>(x => x.TextExpression = new JavaScriptExpression<string>("`Trigger received. The time is: ${new Date().toISOString()}`"));
|
2019-07-22 16:55:02 +00:00
|
|
|
}
|
|
|
|
|
}
|
2019-06-27 20:55:55 +00:00
|
|
|
}
|