Aracılığıyla paylaş


WorkflowInstance.Load Yöntem

Tanım

Daha önce kaldırılmış bir iş akışı örneğini yükler.

public:
 void Load();
public void Load ();
member this.Load : unit -> unit
Public Sub Load ()

Özel durumlar

İş akışı çalışma zamanı altyapısı çalışmıyor.

Örnekler

Aşağıdaki örnekte daha önce kaldırılmış bir nesnenin nasıl yüklendiği WorkflowInstance gösterilmektedir.

// Create a WorkflowRuntime object
WorkflowRuntime workflowRuntime = new WorkflowRuntime();
// Create a new instance of the out-of-box SqlWorkflowPersistenceService
SqlWorkflowPersistenceService persistenceService =
   new SqlWorkflowPersistenceService(
   "Initial Catalog=SqlPersistenceService;Data Source=localhost;Integrated Security=SSPI;");
// Add the service to the runtime
workflowRuntime.AddService(persistenceService);
// Create a WorkflowInstance object
WorkflowInstance workflowInstance = workflowRuntime.CreateWorkflow(typeof(Workflow1));
// Start the workflow instance
workflowInstance.Start();
//Unload the instance
workflowInstance.Unload();
//Reload the previously unloaded instance
workflowInstance.Load();
' Create a WorkflowRuntime object
Dim workflowRuntime As New WorkflowRuntime()
' Create a new instance of the out-of-box SqlWorkflowPersistenceService
Dim persistenceService As _
   New SqlWorkflowPersistenceService( _
   "Initial Catalog=SqlPersistenceServiceData Source=localhostIntegrated Security=SSPI")
' Add the service to the runtime
workflowRuntime.AddService(persistenceService)
' Create a WorkflowInstance object
Dim workflowInstance As WorkflowInstance = workflowRuntime.CreateWorkflow(GetType(Workflow1))
' Start the workflow instance
workflowInstance.Start()
'Unload the instance
workflowInstance.Unload()
'Reload the previously unloaded instance
workflowInstance.Load()

Açıklamalar

Load zaman uyumlu; iş akışı örneği yüklenebiliyorsa, Load iş akışı örneği belleğe yüklendikten ve iş akışı çalışma zamanı altyapısı tarafından zamanlandıktan sonra döndürülecektir. Çalışma zamanı, kalıcılık hizmeti iş akışı örneğini belleğe geri yükledikten sonra ancak iş akışı çalışma zamanı altyapısı örneği zamanlamadan önce olayı tetikler WorkflowLoaded .

Şunlara uygulanır