有什么方法可以使用C#逐步执行Windows Workflow Foundation?

时间:2018-10-02 14:33:23

标签: c# workflow-foundation-4 workflow-foundation

我是Windows Workflow Foundation的初学者,我正在尝试执行下一个顺序流

new Sequence()
{              
    Activities = {
        new WriteLine() { Text = "Step 1" },
        new WriteLine() { Text = "Step 2" },
        new WriteLine() { Text = "Step 3" },
        new WriteLine() { Text = "Step 4" },
    }
};

当我这样做

WorkflowApplication application = new WorkflowApplication(activity);
application.Run();

该流程按照计划运行每个步骤

我想知道是否有任何逐步执行此流程的方法,比如:

application.Next(); //expected output "Step 1"
application.Next(); //expected output "Step 2"
application.Next(); //expected output "Step 3"
application.Next(); //expected output "Step 4"

谢谢!

0 个答案:

没有答案