Table of Contents

Class WorkflowNotificationService

Namespace
Dynamicweb.Security.Workflows
Assembly
Dynamicweb.Security.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 void AddNotificationToState(WorkflowState workflowState, WorkflowNotification notification)

Parameters

workflowState WorkflowState
The state
notification WorkflowNotification
The notification to add for the state

Remarks

If the notification already added to the state the exception will be thrown

Exceptions

ApplicationException

Delete(int)

Delete notification by id
public void Delete(int workflowNotificationId)

Parameters

workflowNotificationId int
The notification id to remove

GetById(int)

Gets notification by workflowNotificationId
public WorkflowNotification GetById(int workflowNotificationId)

Parameters

workflowNotificationId int
The workflow notification id

Returns

WorkflowNotification

GetByState(WorkflowState)

Gets all notifications for the workflowState
public IEnumerable<WorkflowNotification> GetByState(WorkflowState workflowState)

Parameters

workflowState WorkflowState
The state

Returns

IEnumerable<WorkflowNotification>

GetRecipients(WorkflowNotification)

public IEnumerable<User> GetRecipients(WorkflowNotification notification)

Parameters

notification WorkflowNotification

Returns

IEnumerable<User>

Save(WorkflowNotification)

Save workflow notification
public WorkflowNotification Save(WorkflowNotification notification)

Parameters

notification WorkflowNotification
The notification to save

Returns

WorkflowNotification
Return updated version of the notification

SetNotificationsToState(WorkflowState, IEnumerable<WorkflowNotification>)

Sets new notifications to the workflowState
public void SetNotificationsToState(WorkflowState workflowState, IEnumerable<WorkflowNotification> notifications)

Parameters

workflowState WorkflowState
The state
notifications IEnumerable<WorkflowNotification>
The new notifications for the state

Remarks

After execution of this method all previouse state notifications will be replaced by a new notifications
To top