具有 WF 4 和 AppFabric 的集群中的单个实例

发布于 2024-09-26 07:38:01 字数 305 浏览 6 评论 0原文

我正在尝试使用 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

机场等船 2024-10-03 07:38:01

我已经找到了解决方案。这是我写过的内容:
http://pablocastilla.wordpress.com/2010/10/09/single-instance-of-a-workflow-in-the-cluster-with-wf-4-0-and-appfabric/

如何才能接收同一个实例的消息呢?在接收形状中做一些小技巧很容易:

  1. 我们创建一个相关处理程序。我们将其称为 singleIntanceHandler
  2. 在接收形状中,将 CorrelatesWith 属性设置为 singleInstanceHandler。
  3. 在 CorrelatesOn 定义中,您应该插入一个字符串,而不是 xpath 表达式。例如:“asdf”。
  4. 将相关初始值设定项保留为响应句柄。

据我了解,第一次创建实例并初始化与“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:

  1. We create a correlation handler. Let’s call it singleIntanceHandler
  2. In the receive shape set the CorrelatesWith property with the singleInstanceHandler.
  3. In the CorrelatesOn definition you should insert a string, not an xpath expression. For instance: “asdf”.
  4. Leave the correlation initializer just with the handle for the response.

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文