从自托管工作流切换到 Workflow Foundation 4 中的工作流服务时出现持久性错误

发布于 2024-11-07 09:07:37 字数 744 浏览 0 评论 0原文

我正在开发一个应用程序,该应用程序使用在 Windows Workflow Foundation 4 中构建的状态机来控制多个应用程序层的工作流。在大多数情况下,工作流执行得非常好,但是在添加 sqlWorkflowInstanceStore 时出现了意想不到的问题。

更具体地说,当作为工作流服务运行时,一些必要的数据(ActiveBookmarks、ExecutionStatus、IsInitialized、IsSuspished 和一些其他字段)在工作流持久化时不会保存到数据库中。

我花了几天时间对此进行调试,结果发现,当使用完全相同的设置运行完全相同的工作流程时,但作为自托管活动,而不是工作流程服务,一切都可以顺利执行。这让我相信问题出在服务器/主机配置中的某个地方。

我将尝试在不同的配置下托管,并按照以下指南在 IIS 中托管活动:

在 IIS 中托管自托管 WF

http: //msdn.microsoft.com/en-us/library/ff729688.aspx

但是,如果有人可以指出此错误的更具体原因,我将非常感激,因为这是目前最大的问题在我们发布之前需要解决这个问题。

I am developing an application that is using a state machine constructed in Windows Workflow Foundation 4 in order to control the workflow of several application tiers. The workflow executes admirably, for the most part, however unexpected problems appeared when sqlWorkflowInstanceStore was added.

More specifically, when running as a workflow service some of the necessary data (ActiveBookmarks, ExecutionStatus, IsInitialized, IsSuspended and a few other fields) does not get saved into the database when a workflow is persisted.

I have spent several days debugging this only to find that when the exact same workflow is run with the exact same settings, but as a self-hosted activity, instead of a workflow service everything performs without a hitch. This leads me to believe that the problem is somewhere in the server/host configuration.

I am going to try hosting under different configs as well as hosting an activity in IIS as per these guides:

Hosting a self-hosted WF in IIS

http://msdn.microsoft.com/en-us/library/ff729688.aspx

However, if someone can point me to a more specific reason for this error, I would be very grateful as this is currently the single biggest issue that needs to be tackled before we can release.

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文