diff --git a/docs/getting-started.md b/docs/getting-started.md index 49ac1f38e..cd434e001 100644 --- a/docs/getting-started.md +++ b/docs/getting-started.md @@ -87,7 +87,7 @@ Each running workflow is persisted to the chosen persistence provider between ea ## Host -The workflow host is the service responsible for executing workflows. It does this by polling the persistence provider for workflow instances that are ready to run, executes them and then passes them back to the persistence provider to by stored for the next time they are run. It is also responsible for publishing events to any workflows that may be waiting on one. +The workflow host is the service responsible for executing workflows. It does this by polling the persistence provider for workflow instances that are ready to run, executes them and then passes them back to the persistence provider to be stored for the next time they are run. It is also responsible for publishing events to any workflows that may be waiting on one. ### Setup @@ -114,6 +114,16 @@ Console.ReadLine(); host.Stop(); ``` +## Registry + +The registry contains workflow definitions which have been registered. When starting a workflow, the workflow host creates a new instance for the desired workflow definition. + + +## Persistence + +The persistence provider persists internal data which allows to resume workflows. Part of this are execution pointers which are created for every step that is visited during the execution of a workflow. They hold information about the outcome of the step and thus also indicate which step has to be run next. + + ## Passing data between steps Each step is intended to be a black-box, therefore they support inputs and outputs. These inputs and outputs can be mapped to a data class that defines the custom data relevant to each workflow instance. diff --git a/src/WorkflowCore/Interface/IWorkflowHost.cs b/src/WorkflowCore/Interface/IWorkflowHost.cs index 8e279096c..a09faf017 100644 --- a/src/WorkflowCore/Interface/IWorkflowHost.cs +++ b/src/WorkflowCore/Interface/IWorkflowHost.cs @@ -18,14 +18,33 @@ public interface IWorkflowHost : IWorkflowController, IActivityController, IHost /// void Stop(); - + /// + /// Fires events when an error is thrown in a workflow step. + /// event StepErrorEventHandler OnStepError; + + /// + /// Fires events on workflow and step lifecycle changes like started and completed steps/workflows + /// and workflow errors. + /// event LifeCycleEventHandler OnLifeCycleEvent; void ReportStepError(WorkflowInstance workflow, WorkflowStep step, Exception exception); //public dependencies to allow for extension method access + + /// + /// Persists workflow data like workflow status and events. + /// IPersistenceProvider PersistenceStore { get; } + + /// + /// Provides locks for resources in the persistence store to ensure exclusive access. + /// IDistributedLockProvider LockProvider { get; } + + /// + /// Contains the workflow definitions which are used for creating workflow instances. + /// IWorkflowRegistry Registry { get; } WorkflowOptions Options { get; } IQueueProvider QueueProvider { get; }