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

时间:2010-01-14 16:39:30

标签: sharepoint sharepoint-2007 wss-3.0

我有一个正在运行的工作流程,它同时使用parallell和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 Workflow Host有关,我可以在升级过程中以编程方式终止所有正在运行的工作流吗?

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

1 个答案:

答案 0 :(得分:3)

你应该听取这些人的意见,或者至少调查自己为什么要说这些话。他们是对的,现在你知道为什么了;你已经有效地搞砸了所有正在运行的工作流程。

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

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

-Oisin