1

我必須跑在我的自定義實體的按需工作流程的所有頁面運行按需工作流程,如何通過

可以說我有100萬條記錄,所以,我怎麼可以運行在這些記錄這個工作流程。

因爲,據我所知,我們只能選擇記錄,並從功能區單擊運行工作流程並指定它。在這種方式爲單次嘗試最大,我只能選擇一個頁面記錄,因此限制訪問

任何想法?

回答

7

你不能用UI做到這一點。 最簡單的方法是使用一個小程序來選擇所有記錄並觸發工作流執行。

您可以使用ExecuteWorkflowRequest執行此任務。

// Create an ExecuteWorkflow request. 
ExecuteWorkflowRequest request = new ExecuteWorkflowRequest() 
{ 
    WorkflowId = <insert workflow id here>, 
    EntityId = <insert record id here> 
}; 

// Execute the workflow. 
var response = (ExecuteWorkflowResponse)_serviceProxy.Execute(request); 
+0

謝謝ckeller!但我正在尋找一些代碼少解決方案..... –

+0

有沒有辦法如何做到這一點與百萬記錄與用戶界面。 – ccellar