2012-04-12 55 views
1

我正在使用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).'

+0

你解決了嗎?怎麼樣? – 2012-10-11 11:30:35

回答

0

難道用喲任何更改都會更改工作流程定義?如果是這樣的WF4無法處理,該功能將被添加到WF4.5。

另外我會啓用服務器上的WCF跟蹤,看看你是否有更多的細節。通常情況下,真正的原始異常會被記錄下來,但不會傳播到客戶端。

+0

我沒有對工作流進行任何更改。這裏沒有涉及真正的客戶端 - 這是一個長時間運行的工作流程,服務互相通話。將嘗試WCF跟蹤。 – jonsb 2012-04-13 09:07:36

+0

我已經做了一些WCF追蹤,但沒有錯誤出現在那裏。 – jonsb 2012-04-13 11:24:49

+0

奇怪。我嘗試通過設置數據庫中的懸掛列來暫停所有工作流程。接下來嘗試重新啓動應用程序池以查看是否有任何問題。如果沒有,請使用瀏覽器來打開工作流的WSDL頁面。這樣,WorklfowServiceHost啓動並運行,但您應該有0個工作流實例處於活動狀態。如果仍然有效,請嘗試在當時恢復一個工作流程,並查看哪一個會導致問題。 – Maurice 2012-04-13 12:28:28