* Fix StringValues serialization and rename WorkflowDefinition to WorkflowDefinitionVersion * Fix Singleton issue and add support for absolute URL using base URL for background tasks * Fix persistence and lifetime scope issues * Fix timer bugs * Various bug fixes
22 lines
750 B
C#
22 lines
750 B
C#
using System;
|
|
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()
|
|
.StartWith<TimerEvent>(x => x.TimeoutExpression = new PlainTextExpression<TimeSpan>("00:00:05"), "Timer")
|
|
.Then<WriteLine>(x => x.TextExpression = new JavaScriptExpression<string>("`Trigger received. The time is: ${new Date().toISOString()}`"))
|
|
.Then("Timer");
|
|
}
|
|
}
|
|
} |