Table of Contents

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

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 virtual void Delete(int workflowNotificationId)

Parameters

workflowNotificationId int

The notification id to remove

GetById(int)

Gets notification by workflowNotificationId

public virtual WorkflowNotification? GetById(int workflowNotificationId)

Parameters

workflowNotificationId int

The workflow notification id

Returns

WorkflowNotification

GetByState(WorkflowState)

Gets all notifications for the workflowState

public virtual IEnumerable<WorkflowNotification> GetByState(WorkflowState workflowState)

Parameters

workflowState WorkflowState

The state

Returns

IEnumerable<WorkflowNotification>

GetRecipients(WorkflowNotification)

public virtual IEnumerable<User> GetRecipients(WorkflowNotification notification)

Parameters

notification WorkflowNotification

Returns

IEnumerable<User>

Save(WorkflowNotification)

Save workflow notification

public virtual 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 virtual 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 previous state notifications will be replaced by a new notifications

To top