ReleaseNotes/1.2.9.md
This following example will execute the block of every day until the StopRecurring field on the data object becomes true
builder
.StartWith<HelloWorld>()
.Recur(data => TimeSpan.FromDays(1), data => data.StopRecurring)
.Do(recur => recur
.StartWith<DoSomething>()
.Then<DoSomethingElse>())
.Then<GoodbyeWorld>();
.WaitFor("event", (data, context) => context.Workflow.Id)
UserStep in favour of the new UserTask APIUserTaskThis following example will create a user task with 2 options and 2 resultant paths, as well as escalate the task after 1 day.
builder
.StartWith(context => ExecutionResult.Next())
.UserTask("Do you approve", data => @"domain\bob")
.WithOption("yes", "I approve").Do(then => then
.StartWith(context => Console.WriteLine("You approved"))
)
.WithOption("no", "I do not approve").Do(then => then
.StartWith(context => Console.WriteLine("You did not approve"))
)
.WithEscalation(x => TimeSpan.FromDays(1), x => @"domain\frank", action => action
.StartWith(context => Console.WriteLine("Escalated task"))
.Then(context => Console.WriteLine("Sending notification..."))
)
.Then(context => Console.WriteLine("end"));