語言

WorkflowRuntimeElement.ValidateOnCreate 屬性

定義

取得或設定一個值,指示是否會在建立工作流程實例時進行驗證。

public:
 property bool ValidateOnCreate { bool get(); void set(bool value); };
[System.Configuration.ConfigurationProperty("validateOnCreate", DefaultValue=true)]
public bool ValidateOnCreate { get; set; }
[<System.Configuration.ConfigurationProperty("validateOnCreate", DefaultValue=true)>]
member this.ValidateOnCreate : bool with get, set
Public Property ValidateOnCreate As Boolean

屬性值

true是否會在創建時進行驗證;否則,。 false

屬性

備註

當此屬性設定為 true時,每次 CreateWorkflow 呼叫時都會執行工作流程驗證。 若發現驗證錯誤,則會拋出錯誤 WorkflowValidationFailedException 。

當此屬性設定為 false時, CreateWorkflow 會建立一個工作流程實例並跳過驗證。 此時,主機應用程式必須確保工作流程正確配置,否則會發生執行時錯誤。

這個屬性預設值為 true。

適用於