在 Windows Workflow Foundation 4 中恢复挂起的状态机工作流实例

发布于 2024-12-26 01:53:13 字数 225 浏览 1 评论 0原文

我当前有一个作为 Windows Workflow Foundation 4 Web 服务运行的状态机。该解决方案适用于长时间运行的工作流,因此它还利用 SqlWorkflowInstanceStore。我遇到的问题是我找不到恢复挂起的工作流实例的解决方案。我在网上看到的例子似乎不适用于状态机。造成混乱的原因似乎是我没有创建正确的 WorflowControlClient 对象所需的端点来引用。

任何帮助将不胜感激。

I currently have a State Machine running as a Windows Workflow Foundation 4 Web Service. This solution is for long running workflows so it also utilizes the SqlWorkflowInstanceStore. The problem I have is that I can’t find a solution to Resuming a Suspended workflow instance. The examples I’ve seen online don’t seem to apply for a State Machine. The confusion seems to come from the fact that I don’t have an endpoint to reference which is needed to create the proper WorflowControlClient object.

Any help would be appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

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

评论(1

没有你我更好 2025-01-02 01:53:13

我在服务的同一子目录中创建了一个 web.config 文件。然后,对于每个接收操作,我必须在新创建的 web.config 中定义一个端点。然后,我可以添加额外的端点定义作为工作流控制端点。

<endpoint address="wce" binding="basicHttpBinding" name="wceEndpoint" kind="workflowControlEndpoint"/>
<endpoint address="" binding="basicHttpBinding" name="WorkFlowCreated" contract="IWorkFlowCreated" />
<endpoint address="" binding="basicHttpBinding" name="WorkFlowUpdated" contract="IWorkFlowUpdated" />

然后就可以创建 WorkflowControlClient

WorkflowControlClient controlClient = new WorkflowControlClient(
  new BasicHttpBinding(), 
  new EndpointAddress(new Uri("http://sitepath/general/1.0.0/General.xamlx/wce")));
controlClient.Unsuspend(instanceId);</code>

I created a web.config file in the same subdirectory of my service. Then for each Receive action I had to define an endpoint in the newly created web.config. I was then able to add an additional endpoint definition as a workflowControlEndpoint.

<endpoint address="wce" binding="basicHttpBinding" name="wceEndpoint" kind="workflowControlEndpoint"/>
<endpoint address="" binding="basicHttpBinding" name="WorkFlowCreated" contract="IWorkFlowCreated" />
<endpoint address="" binding="basicHttpBinding" name="WorkFlowUpdated" contract="IWorkFlowUpdated" />

Then it became possible to create the WorkflowControlClient

WorkflowControlClient controlClient = new WorkflowControlClient(
  new BasicHttpBinding(), 
  new EndpointAddress(new Uri("http://sitepath/general/1.0.0/General.xamlx/wce")));
controlClient.Unsuspend(instanceId);</code>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文