Class BaseNotifier
OptimaJet.Workflow.RealTimeTrackingPlugin.Notifiers.BaseNotifier
Represents a base class for system notifications.
Namespace: OptimaJet.Workflow.RealTimeTrackingPlugin.Notifiers
public abstract class BaseNotifierInheritance
- System.Object
Constructors
protected BaseNotifier(WorkflowRuntime runtime, RealTimeTrackingPluginSettings settings, Func<bool> getDisabledFn) #Initializes a new instance of the BaseNotifier class.
Parameters
Name
Type
Description
runtimeWorkflowRuntimeWorkflowRuntime.
getDisabledFnFunc<Boolean>A function that returns a boolean indicating whether the plugin is disabled.
Methods
public void SetHubContext(IHubContext<WorkflowEngineHub> hubContext) #Sets the context for the SignalR hub used by the WorkflowEngineHub.
Parameters
Name
Type
Description
hubContextIHubContext<WorkflowEngineHub>An instance of SignalR.IHubContext?text=IHubContext<WorkflowEngineHub>.
public abstract Task OnConnectedAsync(string processId, string connectionId) #Method to handle client connection to a process for tracking purposes.
Parameters
Name
Type
Description
processIdStringProcessId of the ProcessInstance.
connectionIdStringThe unique identifier of the client's connection.
Returns
Type
Description
TaskA Task representing the asynchronous operation.
public abstract Task OnDisconnectedAsync(string connectionId) #Handles the disconnection of a connection.
Parameters
Name
Type
Description
connectionIdStringThe unique identifier for the connection.
Returns
Type
Description
TaskA Task representing the asynchronous operation.
public abstract Task StopAsync() #Stops the plugin.
Returns
Type
Description
TaskA Task representing the asynchronous operation.
protected void ExitLock() #Exits lock.
protected Task SendProcessChangedAsync(ProcessInstance processInstance) #Sends a notification when a process changes.
Parameters
Name
Type
Description
processInstanceProcessInstanceThe instance of the ProcessInstance.
Returns
Type
Description
TaskFields
protected readonly WorkflowRuntime _runtime #An instance of the WorkflowRuntime.
protected readonly ConcurrentDictionary<string, List<string>> _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.
protected readonly Func<bool> _getDisabledFn #A function that returns a boolean indicating whether the plugin is disabled.