我正在使用Windows Server AppFabric運行幾個WF 4服務。有時候,工作流中會發生未處理的異常,並且會被放棄(如果對未處理的異常的操作設置爲「放棄」)或掛起(如果操作設置爲「放棄和掛起」)。爲什麼在AppFabric中恢復暫停的工作流會給出錯誤?
在「放棄」的情況下,工作流在異常後仍然是「運行(活動)」,我希望AppFabric WorkflowManagementService自動從其最後一個持續點開始繼續工作流。
在「放棄和暫停」的情況下,我非常希望能夠通過AppFabric儀表板手動恢復工作流。
在任何情況下,這種情況不會發生,但我得到的AppFabric的儀表板和Windows事件查看器中的各種錯誤和警告消息(Windows - >應用程序服務器的系統服務 - >管理員):
錯誤:
Failed to invoke service management endpoint at 'net.pipe://jon-hp/Afis.Workflow/ServiceManagement.svc' to activate service '/Afis.Workflow/ATP.xamlx'.\rException: 'The open operation did not complete within the allotted timeout of 00:01:00. The time allotted to this operation may have been a portion of a longer timeout.'
錯誤:
Failed to Resume instance d626005a-63bd-4ab1-8192-62616755015c via control endpoint net.pipe://jon-hp/Afis.Workflow/ATP.xamlx/System.ServiceModel.Activities_IWorkflowInstanceManagement.\rException: System.TimeoutException: The open operation did not complete within the allotted timeout of 00:01:00. The time allotted to this operation may have been a portion of a longer timeout. Inner Exception: System.TimeoutException: The pipe connection was aborted because an asynchronous read from the pipe did not complete within the allotted timeout of 00:00:59.9989999. The time allotted to this operation may have been a portion of a longer timeout. Inner Exception: System.IO.PipeException: The operation cannot be completed because the pipe was closed. This may have been caused by the application on the other end of the pipe exiting..
警告(週期性地每20分鐘)
WMS was not able to activate any of the hosts - backing off. Store name 'defaultSqlPersistenceStore' ('Root).
Net.pipe爲我的網站和應用程序啓用,我可以看到IIS管理器 - >端點 - >刪除過濾器(System.ServiceModel.Activities.IWorkflowInstanceManagement)中列出的管理端點。
我的應用程序端點正在運行帶有傳輸安全性和Windows身份驗證的net.tcp。
此線程似乎有關,但我沒能解決從中我的問題: http://social.msdn.microsoft.com/Forums/en/dublin/thread/e1705e89-34cc-4526-b11e-9d67d66c403d
編輯1:我的場景涉及客戶端調用工作流,其中做了一些處理,然後堅持和回報。工作流A然後調用工作流B,工作流B立即拋出異常。工作流A沒有捕獲這個,並且被放棄,但仍然從上一個持久性點運行(活動)。工作流程B也被放棄,但沒有被持續,因此獲得狀態正在運行(空閒),等待來自工作流程A的消息。
然後,我希望工作流程A自動恢復並再次調用工作流程B,但這不會發生。
編輯2:我在事件日誌中得到的錯誤類型似乎不一致。在時間,我沒有得到任何錯誤,但我也看到以下(除了上面的那些):
Failed to Resume instance 032274d1-b6e6-4163-a33a-73bffc8da2cc via control endpoint net.pipe://jon-hp/Afis.Workflow/ATP.xamlx/System.ServiceModel.Activities_IWorkflowInstanceManagement.\rException: System.ServiceModel.FaultException: The execution of an InstancePersistenceCommand was interrupted because the instance '032274d1-b6e6-4163-a33a-73bffc8da2cc' has not yet been persisted to the instance store..
Failed to Resume instance d2b19a41-985e-4dc4-8fd1-955df2cde243 via control endpoint net.pipe://jon-hp/Afis.Workflow/Import.xamlx/System.ServiceModel.Activities_IWorkflowInstanceManagement.\rException: System.ServiceModel.FaultException: The execution of the InstancePersistenceCommand named {urn:schemas-microsoft-com:System.Activities.Persistence/command}LoadWorkflow was interrupted by an error..
Failed to invoke service management endpoint at 'net.pipe://jon-hp/Afis.Workflow/ServiceManagement.svc' to activate service '/Afis.Workflow/ATP.xamlx'.\rException: 'There was an error reading from the pipe: Unrecognized error 109 (0x6d).'
你解決了嗎?怎麼樣? – 2012-10-11 11:30:35