# Class BaseNotifier OptimaJet.Workflow.RealTimeTrackingPlugin.Notifiers.BaseNotifier Represents a base class for system notifications. Namespace: [OptimaJet.Workflow.RealTimeTrackingPlugin.Notifiers](https://api.workflowengine.io/realtime-tracking-plugin/OptimaJet.Workflow.RealTimeTrackingPlugin.Notifiers/) ```csharp public abstract class BaseNotifier ``` ## Type Hierarchy - BaseNotifier Current type - [MultiServerNotifier](https://api.workflowengine.io/realtime-tracking-plugin/OptimaJet.Workflow.RealTimeTrackingPlugin.Notifiers/MultiServerNotifier/) - [SingleServerNotifier](https://api.workflowengine.io/realtime-tracking-plugin/OptimaJet.Workflow.RealTimeTrackingPlugin.Notifiers/SingleServerNotifier/) ## Constructors `protected BaseNotifier(WorkflowRuntime runtime, RealTimeTrackingPluginSettings settings, Func getDisabledFn)` Initializes a new instance of the [BaseNotifier](https://api.workflowengine.io/realtime-tracking-plugin/OptimaJet.Workflow.RealTimeTrackingPlugin.Notifiers/BaseNotifier/) class. ### Parameters | Name | Type | Description | | --- | --- | --- | | `runtime` | `WorkflowRuntime` | WorkflowRuntime. | | `settings` | `RealTimeTrackingPluginSettings` | [RealTimeTrackingPluginSettings](https://api.workflowengine.io/realtime-tracking-plugin/OptimaJet.Workflow.RealTimeTrackingPlugin/RealTimeTrackingPluginSettings/). | | `getDisabledFn` | `Func` | A function that returns a boolean indicating whether the plugin is disabled. | ## Methods `public void SetHubContext(IHubContext hubContext)` Sets the context for the SignalR hub used by the WorkflowEngineHub. ### Parameters | Name | Type | Description | | --- | --- | --- | | `hubContext` | `IHubContext` | An instance of SignalR.IHubContext?text=IHubContext. | `public abstract Task OnConnectedAsync(string processId, string connectionId)` Method to handle client connection to a process for tracking purposes. ### Parameters | Name | Type | Description | | --- | --- | --- | | `processId` | `String` | ProcessId of the ProcessInstance. | | `connectionId` | `String` | The unique identifier of the client's connection. | ### Returns | Type | Description | | --- | --- | | `Task` | A [Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task) representing the asynchronous operation. | `public abstract Task OnDisconnectedAsync(string connectionId)` Handles the disconnection of a connection. ### Parameters | Name | Type | Description | | --- | --- | --- | | `connectionId` | `String` | The unique identifier for the connection. | ### Returns | Type | Description | | --- | --- | | `Task` | A [Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task) representing the asynchronous operation. | `public Task StartAsync()` Starts the plugin. ### Returns | Type | Description | | --- | --- | | `Task` | | `public abstract Task StopAsync()` Stops the plugin. ### Returns | Type | Description | | --- | --- | | `Task` | A [Task](https://learn.microsoft.com/dotnet/api/system.threading.tasks.task) representing the asynchronous operation. | `protected Task EnterLockAsync()` Enters lock. ### Returns | Type | Description | | --- | --- | | `Task` | | `protected void ExitLock()` Exits lock. `protected Task SendProcessChangedAsync(ProcessInstance processInstance)` Sends a notification when a process changes. ### Parameters | Name | Type | Description | | --- | --- | --- | | `processInstance` | `ProcessInstance` | The instance of the ProcessInstance. | ### Returns | Type | Description | | --- | --- | | `Task` | | ## Fields `protected readonly WorkflowRuntime _runtime` An instance of the WorkflowRuntime. `protected readonly ConcurrentDictionary> _groups` A concurrent dictionary mapping process ids to lists of connected clients. Used to track active processed and the clients associated with them. `protected bool _isStarted` Indicates whether the plugin has started. `protected readonly RealTimeTrackingPluginSettings _settings` An instance of the [RealTimeTrackingPluginSettings](https://api.workflowengine.io/realtime-tracking-plugin/OptimaJet.Workflow.RealTimeTrackingPlugin/RealTimeTrackingPluginSettings/). `protected readonly Func _getDisabledFn` A function that returns a boolean indicating whether the plugin is disabled. [Previous WorkflowEngineHub](https://api.workflowengine.io/realtime-tracking-plugin/OptimaJet.Workflow.RealTimeTrackingPlugin.Hubs/WorkflowEngineHub/) [Next MultiServerNotifier](https://api.workflowengine.io/realtime-tracking-plugin/OptimaJet.Workflow.RealTimeTrackingPlugin.Notifiers/MultiServerNotifier/)