重用接收活动
我对工作流程完全是菜鸟!
我想托管多个工作流程(不作为服务,沼泽标准工作流程);但是我也希望他们共享一个共同的活动(ActivityX)。现在 ActivityX 应该阻止/空闲当前工作流程,直到它收到接收调用。
我可以重复使用此活动吗?我猜我需要将其设为一项服务,asmx?但是如何让它阻止它所使用的工作流程 - 如果我将它拖到那些尝试调用该服务的工作流程中,而不是仅仅等到该调用发生。
有人可以提出一些建议吗?它不一定是接收活动,但我需要一种方便的方法来空闲工作流程,直到特定对象(或者如果需要,一组参数)到达。
我陷入了困境,并且在我对 WF 4.0 的理解非常差的情况下显然遗漏了一些东西。
谢谢,
皮特。
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 workflows 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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您使用 Receive 活动,则必须使用 WorkflowServicehost 作为主机,并且不能使用 WorkflowApplication 或 WorkflowInvoker,因为它依赖于 BaseServiceHost 中的 WCF 基础结构。
创建阻止活动是使用书签完成的。您创建一个书签,工作流程就会停止,直到您恢复该书签为止,至少使用默认选项。事实上,接收活动正是这样做的,作为使工作流等待 WCF 消息的一部分。
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.