Class WorkflowNotificationService
- Namespace
- Dynamicweb.Security.Workflows
- Assembly
- Dynamicweb.Core.dll
The WorkflowNotificationService class is a Domain Service responsible for resolving and creating workflow notifications
public class WorkflowNotificationService
- Inheritance
-
WorkflowNotificationService
- Inherited Members
Methods
AddNotificationToState(WorkflowState, WorkflowNotification)
Add new notification to the workflowState
public virtual void AddNotificationToState(WorkflowState workflowState, WorkflowNotification notification)
Parameters
workflowStateWorkflowStateThe state
notificationWorkflowNotificationThe notification to add for the state
Remarks
If the notification already added to the state the exception will be thrown
Exceptions
Delete(int)
Delete notification by id
public virtual void Delete(int workflowNotificationId)
Parameters
workflowNotificationIdintThe notification id to remove
GetById(int)
Gets notification by workflowNotificationId
public virtual WorkflowNotification? GetById(int workflowNotificationId)
Parameters
workflowNotificationIdintThe workflow notification id
Returns
GetByState(WorkflowState)
Gets all notifications for the workflowState
public virtual IEnumerable<WorkflowNotification> GetByState(WorkflowState workflowState)
Parameters
workflowStateWorkflowStateThe state
Returns
GetRecipients(WorkflowNotification)
public virtual IEnumerable<User> GetRecipients(WorkflowNotification notification)
Parameters
notificationWorkflowNotification
Returns
Save(WorkflowNotification)
Save workflow notification
public virtual WorkflowNotification Save(WorkflowNotification notification)
Parameters
notificationWorkflowNotificationThe notification to save
Returns
- WorkflowNotification
Return updated version of the notification
SetNotificationsToState(WorkflowState, IEnumerable<WorkflowNotification>)
Sets new notifications to the workflowState
public virtual void SetNotificationsToState(WorkflowState workflowState, IEnumerable<WorkflowNotification> notifications)
Parameters
workflowStateWorkflowStateThe state
notificationsIEnumerable<WorkflowNotification>The new notifications for the state
Remarks
After execution of this method all previous state notifications will be replaced by a new notifications