升级解决方案后 Sharepoint 工作流程失败

发布于 2024-08-17 16:39:48 字数 2539 浏览 4 评论 0原文

我有一个正在运行的工作流程,它同时使用并行活动和 OnTaskCreated 活动。该解决方案已部署在多个客户端,我最近正在进行升级,需要更换工作流程组件。升级时,我在服务器上有一些正在运行的工作流实例。

从那时起,一切都不起作用,我似乎无法正常完成新的工作流程。我总是在这里收到此错误:

01/14/2010 16:14:33.73  w3wp.exe (0x1928)                           0x2514  Windows SharePoint Services     Workflow Infrastructure         936l    High        Engine RunWorkflow: System.Workflow.Activities.EventDeliveryFailedException: Event "OnTaskChanged" on interface type "Microsoft.SharePoint.Workflow.ITaskService" for instance id "7697ee64-7286-46f3-992e-cf3c18731f15" cannot be delivered. ---> System.NullReferenceException: Object reference not set to an instance of an object.     at Microsoft.SharePoint.Workflow.SPWorkflowHostServiceBase.LoadInstanceData(Guid instanceId, Boolean& compressedData)     at Microsoft.SharePoint.Workflow.SPWinOePersistenceService.LoadWorkflowInstanceState(Guid instanceId)     at System.Workflow.Runtime.WorkflowRuntime.InitializeExecutor(Guid instanceId, CreationContext context, WorkflowExecutor executor, WorkflowInstance workflowInstance)     at System.Workflow.Runtime.WorkflowRuntime.Load(Guid key, CreationCont...  
01/14/2010 16:14:33.73* w3wp.exe (0x1928)                           0x2514  Windows SharePoint Services     Workflow Infrastructure         936l    High        ...ext context, WorkflowInstance workflowInstance)     at System.Workflow.Runtime.WorkflowRuntime.GetWorkflow(Guid instanceId)     at System.Workflow.Activities.WorkflowMessageEventHandler.EventHandler(Object sender, ExternalDataEventArgs eventArgs)     --- End of inner exception stack trace ---     at System.Workflow.Activities.WorkflowMessageEventHandler.EventHandler(Object sender, ExternalDataEventArgs eventArgs)     at Microsoft.SharePoint.Workflow.SPWinOETaskService.RaiseEvent(SPWinOeWorkflow workflow, SPWorkflowEvent workflowEvent, Object workItem, IPendingWork workHandler)     at Microsoft.SharePoint.Workflow.SPWinOeHostServices.Send(SPWinOeWorkflow winoeworkflow, SPWorkflowEvent e)     at Microsoft.SharePoint.Workflow.SPWinOeEngine.RunWorkflow(Guid trackingId, SPWorkflowHostService ho...   
01/14/2010 16:14:33.73* w3wp.exe (0x1928)                           0x2514  Windows SharePoint Services     Workflow Infrastructure         936l    High        ...st, SPWorkflow workflow, Collection`1 events, TimeSpan timeOut)   

我一直在谷歌上搜索该问题,并找到了多种解决方案,人们建议在升级之前终止所有工作流程实例。在我看来,该解决方案是不可接受的,因为我可能会运行大量无法管理的工作流程。

我想知道这是否可能与 Sharepoint 工作流主机有关,我可以在升级过程中以编程方式终止所有正在运行的工作流吗?

有人知道我如何解决这个问题吗?

I have a running workflow that is using both the parallell and OnTaskCreated Activities. The solution has bee deployed at multiple clients, I was recently working on an upgrade which required to swap out the workflow assembly. I had some running workflow instances on the server when I did the upgrade.

Since then nothing has been working, I can't seem to geta a new workflow finishing normally. I always gets this error here:

01/14/2010 16:14:33.73  w3wp.exe (0x1928)                           0x2514  Windows SharePoint Services     Workflow Infrastructure         936l    High        Engine RunWorkflow: System.Workflow.Activities.EventDeliveryFailedException: Event "OnTaskChanged" on interface type "Microsoft.SharePoint.Workflow.ITaskService" for instance id "7697ee64-7286-46f3-992e-cf3c18731f15" cannot be delivered. ---> System.NullReferenceException: Object reference not set to an instance of an object.     at Microsoft.SharePoint.Workflow.SPWorkflowHostServiceBase.LoadInstanceData(Guid instanceId, Boolean& compressedData)     at Microsoft.SharePoint.Workflow.SPWinOePersistenceService.LoadWorkflowInstanceState(Guid instanceId)     at System.Workflow.Runtime.WorkflowRuntime.InitializeExecutor(Guid instanceId, CreationContext context, WorkflowExecutor executor, WorkflowInstance workflowInstance)     at System.Workflow.Runtime.WorkflowRuntime.Load(Guid key, CreationCont...  
01/14/2010 16:14:33.73* w3wp.exe (0x1928)                           0x2514  Windows SharePoint Services     Workflow Infrastructure         936l    High        ...ext context, WorkflowInstance workflowInstance)     at System.Workflow.Runtime.WorkflowRuntime.GetWorkflow(Guid instanceId)     at System.Workflow.Activities.WorkflowMessageEventHandler.EventHandler(Object sender, ExternalDataEventArgs eventArgs)     --- End of inner exception stack trace ---     at System.Workflow.Activities.WorkflowMessageEventHandler.EventHandler(Object sender, ExternalDataEventArgs eventArgs)     at Microsoft.SharePoint.Workflow.SPWinOETaskService.RaiseEvent(SPWinOeWorkflow workflow, SPWorkflowEvent workflowEvent, Object workItem, IPendingWork workHandler)     at Microsoft.SharePoint.Workflow.SPWinOeHostServices.Send(SPWinOeWorkflow winoeworkflow, SPWorkflowEvent e)     at Microsoft.SharePoint.Workflow.SPWinOeEngine.RunWorkflow(Guid trackingId, SPWorkflowHostService ho...   
01/14/2010 16:14:33.73* w3wp.exe (0x1928)                           0x2514  Windows SharePoint Services     Workflow Infrastructure         936l    High        ...st, SPWorkflow workflow, Collection`1 events, TimeSpan timeOut)   

I've been googling the problem and I've found multiple solutions where people are advising to terminate all workflow instances before the upgrade is made. In my opinion that solution is not acceptable, because I could have an unmanagable number of running workflows.

I was wondering if this might be related to the Sharepoint Workflow Host, can I terminate all running workflow programmatically during upgrade ?

Does someone have an idea how I can solve this issue ?

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

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

发布评论

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

评论(1

另类 2024-08-24 16:39:48

你应该听听那些人的意见,或者至少自己调查一下他们为什么这么说。他们是对的,现在你知道为什么了;您实际上已经搞砸了所有正在运行的工作流程。

当工作流处于非活动/空闲和/或等待事件时,SharePoint 将二进制工作流序列化到数据库。如果您在程序集休眠/序列化时将其换出,则当共享点中的 WF 托管基础结构尝试反序列化工作流以恢复它时,它将失败,因为目标类型已更改(因为您“升级”了它)

。在 sharepoint 中升级二进制工作流程的简单方法;并排是唯一可管理的方法。您可以更改程序集版本、创建新的 WF 关联并设置旧的 wrkflow 关联以停止接受新请求。旧工作流程将使用旧代码完成,新工作流程将使用您的新代码。没有别的办法了,抱歉。

-奥辛

You should have listened to those people, or at the very least investigated for yourself why they are saying these things. They are right, and now you know why; you have effectively screwed all of your running workflows.

SharePoint serializes a binary workflow to the database when the workflow is inactive/idle and/or waiting for an event. If you swap out the assembly while it is sleeping/serialized, when the WF hosting infrastructure in sharepoint tries to deserialize the workflow to revive it, it will fail because the target type has changed (because you "upgraded" it.)

There is NO easy way to upgrade binary workflows in sharepoint; side-by-side is the only manageable way to do it. You bump the assembly version, create a new WF assocation and set the old wrkflow associations to stop accepting new requests. The old workflows will complete with the old code, and new workflows use your new code. No other way, sorry.

-Oisin

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