Skip to content

Files

Latest commit

98c5436 · Mar 28, 2022

History

History

WorkflowCore.Sample01

Hello World Sample

Illustrates the basic usage of the fluent API for defining workflows.

public class HelloWorldWorkflow : IWorkflow
{
    public void Build(IWorkflowBuilder<object> builder)
    {
        builder
            .StartWith<HelloWorld>()
            .Then<GoodbyeWorld>();
    }
	...
}

and how to define steps

public class HelloWorld : StepBody
{
    public override ExecutionResult Run(IStepExecutionContext context)
    {
        Console.WriteLine("Hello world");
        return ExecutionResult.Next();
    }
}