具有 WF 4 和 AppFabric 的集群中的单个实例
我正在尝试使用 WF4 和 AppFabric 执行单实例工作流程。我只想在集群中运行一个工作流实例。
我尝试过 biztalk 风格:创建实例的方法 (CallService()),以及其他未检查 cancreateinstance 的接收活动 (CallService()) 中的相同方法。 (我想我可以通过 xpath 将其与肥皂消息中的操作关联起来,但是让我们忘记这一步的关联)。
我的问题是 WF 总是创建实例并且在第二次调用中不关联。
你知道如何解决吗?我想优先考虑实例创建的相关性。还有其他方法可以做到吗?
提前致谢。
I am trying to do a single instance workflow with WF4 and AppFabric. I want just one instance of a workflow running in the cluster.
I have tried a biztalk style: a method (CallService()) that creates the instance, and the same method in other receive activity (CallService()) that do not have the cancreateinstance checked. (I think I could correlate it through the xpath to the action in the soap message, but lets forget about correlating at this step).
My problem is that WF always creates the instance and does not correlate in the second call.
Do you know how to solve it? I would like to priorize the correlation against the creation of the instances. Any other way to do it?
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我已经找到了解决方案。这是我写过的内容:
http://pablocastilla.wordpress.com/2010/10/09/single-instance-of-a-workflow-in-the-cluster-with-wf-4-0-and-appfabric/
如何才能接收同一个实例的消息呢?在接收形状中做一些小技巧很容易:
据我了解,第一次创建实例并初始化与“asdf”的关联时,下次收到消息时,AppFabric 会查找是否存在可以与字符串“asdf”关联的实例,并找到初始化的实例在第一次通话中。
I have found the solution. Here is what I have written about:
http://pablocastilla.wordpress.com/2010/10/09/single-instance-of-a-workflow-in-the-cluster-with-wf-4-0-and-appfabric/
How can we receive the messages with the same instance? Is easy making a little trick in the receive shape:
As I understand the first time it creates the instance initializating the correlation with “asdf”, the next time it receives a message, AppFabric looks if there is an instance that he could correlate with the string “asdf”, and it finds the one initialize in the first call.