WorkflowRuntime.StartRuntime Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Starts the workflow run-time engine and the workflow run-time engine services.
public:
void StartRuntime();
public void StartRuntime();
member this.StartRuntime : unit -> unit
Public Sub StartRuntime ()
Exceptions
The WorkflowRuntime is disposed.
There is more than one service workflow CommitWorkBatch
service registered with this WorkflowRuntime.
-or-
There is more than one scheduler service registered with this WorkflowRuntime.
-or-
There is more than one persistence service registered with this WorkflowRuntime.
Remarks
This method verifies that a valid set of core services exists and then starts any services that derive from the WorkflowRuntimeService class. There must be one and only one of each of the following core services: a workflow CommitWorkBatch
service derived from the WorkflowCommitWorkBatchService base class and a scheduler service derived from the WorkflowSchedulerService base class. If either or both of these core services are missing, the workflow run-time engine supplies the appropriate default service: DefaultWorkflowCommitWorkBatchService for the workflow CommitWorkBatch
service and DefaultWorkflowSchedulerService for the scheduler service. A persistence service is optional, but there can be at most only one persistence service present. After it has validated the service configuration, StartRuntime calls Start on all of the services that are derived from the WorkflowRuntimeService class. Finally, the workflow run-time engine sets IsStarted and raises the Started event.
You cannot add or remove core services after the workflow run-time engine is started. Core services are services that derive from the WorkflowSchedulerService class, the WorkflowCommitWorkBatchService class, the WorkflowPersistenceService class, or the TrackingService class. If you call StartRuntime while the workflow run-time engine is running, no action is performed.