Do adds an operation into the workflow definition
            var workflow = Workflow<string>.Definition().Do(a => "w").
Objects can be used to contain complex business logic
            var doubleSpace = new DoubleSpace();
            Workflow<Colour>.Definition().Do(doubleSpace)
You don't need a variable reference to use your operation objects
            var workflow = Workflow<string>.Definition().Do<DoubleSpace>().
A workflow can have sub-workflows
            var subWorkflow = Workflow<string>.Definition().Do(a => "w");
            var workflow = Workflow<string>.Definition().Do(subWorkflow);
Sequential operations can be added using Then()
            var workflow = Workflow<string>.Definition()
                    .Do(a => "hel")
                    .Then().Do(a=> a+="lo")
                    .Then().Do(a=> a+=" world");
Because sequential execution is the default execution mode you can use the short-hand syntax (although the shorthand may not stay in the API after beta);
            var workflow = Workflow<string>.Definition()
                    .Do(a => "hel")
                    .Do(a=> a+="lo")
                    .Do(a=> a+=" world");
Because state is maintained between sequential operations the result of running the above workflow would be to return the string 'hello world'.

Last edited Nov 30, 2010 at 11:58 AM by djnz_gea, version 10

Comments

No comments yet.