开发者

asp.net 4 workflow examples

I'm trying to locate examples on how to implement .net 4 workflow into an asp.net site.

So far all of the examples I've come across have referenced workflow as it existed in .net 3.5.. Which is different.

开发者_如何转开发

I'd like to avoid having a WCF service container and instead just have the workflows loaded directly by the sites in question.

So, does anyone know of current (vs2010, .net 4) examples for workflow?


From the sounds of it you want to execute a workflow serially so that the thread is in fact blocked until the workflow completes. This has the potential to be dangerous but if it's your desire then you can use the new WorkflowInvoker type in WF 4 to synchronously execute a workflow even within ASP.NET. Here's an example:

var outputs = WorkflowInvoker.Invoke(new TestWorkflow(), 
            new Dictionary<string, object> 
            {
                { "x", 5},
                { "y", 10}
            });

int result = (int)outputs["Result"];
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜