开发者

Re-use receive activity

I'm a total noob at workflow!

I want to host several workflows (not as a service, bog standard workflows); however i also want them to share a common activity (ActivityX). Now ActivityX should block / idle the current workflow, until it gets a receive call.

Can I re-use this activity? I'm guessing I need to make it a service, asmx? But then how to make it block the workflows that it's used in - if I drag it on to those workflow开发者_高级运维s that tries to invoke the service, rather than just wait until that call happens.

Can anybody make some suggestions? It doesn't necessarily have to be a receive activity, but I need a convenient way of idling the workflow until a particular object (or if needs be, a set of parameters) arrives.

I'm quite stuck and clearly missing something in my very poor understanding of WF 4.0.

Thanks,

Pete.


If you use a Receive activity you have to use a WorkflowServicehost as the host and can't use a WorkflowApplication or WorkflowInvoker as it depends on the WCF infrastructure from the BaseServiceHost.

Creating blocking activities is done using a bookmark. You create a bookmark and the workflow stops until you resume that bookmark, at least with the default options. In fact the receive activity does exactly this as part of making the workflow wait for the WCF message.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜