Notifications
Umbraco Workflow uses Notifications to allow you to hook into the processes for the backoffice. For example, you might want to execute some code every time an approval group is updated. Notifications allow you to do that. For more information on how Umbraco implements Notifications, see the Using Notifications article.
Notifications
All notifications reside in the Umbraco.Workflow.Core.Notifications
namespace and are postfixed with Notification
.
Typically, available notifications exist in pairs, with a "before" and "after" notification. For example, the SettingsService
class publishes both a WorkflowSettingsSavingNotification
and a WorkflowSettingsSavedNotification
when settings are modified.
Which one you want to use depends on what you want to achieve. If you want to cancel the action, you will use the "before" notification and use the CancelOperation method on the notification to cancel it. If you want to execute some code after the settings have been updated, then you would use the "after" notification.
ContentReviewService Notifications
Notification | Members | Description |
---|---|---|
WorkflowContentReviewsConfigSavingNotification |
| Published when ContentReviewService.SaveContentReviewConfig is called in the API. SavedEntities: Gets the collection of IWorkflowConfig objects being saved. |
WorkflowContentReviewsConfigSavedNotification |
| Published when ContentReviewService.SaveContentReviewConfig is called in the API after the entities have been saved. SavedEntities: Gets the collection of saved IWorkflowConfig objects. |
WorkflowContentReviewsEmailNotificationsSendingNotification |
| Published when ContentReviewReminderEmailer.SendReviewReminders is called in the API before email notifications are sent. Target: Gets a dictionary containing information about the nodes requiring review, and the assigned review groups. |
WorkflowContentReviewsEmailNotificationsSentNotification |
| Published when ContentReviewReminderEmailer.SendReviewReminders is called in the API after email notifications are sent. Target: Gets a dictionary containing information about the nodes requiring review, and the assigned review groups. |
WorkflowContentReviewsReviewingNotification |
| Published when ContentReviewService.MarkAsReviewed is called in the API before the node review status is updated. Target: Get an object with information about the node being reviewed. |
WorkflowContentReviewsReviewedNotification |
| Published when ContentReviewService.MarkAsReviewed is called in the API after the node review status is updated. Target: Get an object with information about the reviewed node. |
ConfigService Notifications
Notification | Members | Description |
---|---|---|
WorkflowContentTypeConfigDeletingNotification |
| Published when ConfigService.DeleteContentTypeConfig is called in the API before the config items are deleted. DeletedEntities: Gets the collection of IWorkflowConfig objects being deleted. |
WorkflowContentTypeConfigDeletedNotification |
| Published when ConfigService.DeleteContentTypeConfig is called in the API after the config items are deleted. DeletedEntities: Gets the collection of deleted IWorkflowConfig objects. Note these items are no longer in the database and exist only in memory. |
WorkflowContentTypeConfigSavingNotification |
| Published when ConfigService.UpdateContentTypeConfig is called in the API. SavedEntities: Gets the collection of IWorkflowConfig objects being saved. |
WorkflowContentTypeConfigSavedNotification |
| Published when ConfigService.UpdateContentTypeConfig is called in the API after the entities have been saved. SavedEntities: Gets the collection of saved IWorkflowConfig objects. |
WorkflowNodeConfigDeletingNotification |
| Published when ConfigService.DeleteNodeConfig is called in the API before the config items are deleted. DeletedEntities: Gets the collection of IWorkflowConfig objects being deleted. |
WorkflowNodeConfigDeletedNotification |
| Published when ConfigService.DeleteNodeConfig is called in the API after the config items are deleted. DeletedEntities: Gets the collection of deleted IWorkflowConfig objects. Note these items are no longer in the database and exist only in memory. |
WorkflowNodeConfigSavingNotification |
| Published when ConfigService.UpdateNodeConfig is called in the API. SavedEntities: Gets the collection of IWorkflowConfig objects being saved. |
WorkflowNodeConfigSavedNotification |
| Published when ConfigService.UpdateNodeConfig is called in the API after the entities have been saved. SavedEntities: Gets the collection of saved IWorkflowConfig objects. |
NotificationsService Notifications
Notification | Members | Description |
---|---|---|
WorkflowEmailNotificationsSendingNotification |
| Published when NotificationsService.SendEmailNotifications is called in the API before email notifications are generated and sent. Target: Gets the object describing the workflow instance used to build the email messages EmailType: Gets the enum value describing the email type |
WorkflowEmailNotificationsSentNotification |
| Published when WorkflowReminderEmailer.Send is called in the API after email notifications are sent. Target: Gets the object describing the email Recipients: Gets the collection of email recipients EmailType: Gets the enum value describing the email type |
WorkflowEmailRemindersSendingNotification |
| Published when NotificationsService.SendEmailReminders is called in the API before email notifications are generated and sent.
Target: Gets the collection of objects describing the workflow instances used to build the email messages
EmailType: Gets the enum value describing the email type. Will always be |
WorkflowEmailRemindersSentNotification |
| Published when WorkflowReminderEmailer.Send is called in the API after email notifications are sent.
Target: Gets the collection of objects describing the workflow instances used to build the email messages
Tasks: Gets the collection of objects describing the overdue workflows for each notified user
EmailType: Gets the enum value describing the email type. Will always be |
GroupService Notifications
Notification | Members | Description |
---|---|---|
WorkflowGroupCreatingNotification |
| Published when GroupService.CreateUserGroupAsync is called in the API before the entity is created. CreatedEntity: Gets the created IWorkflowGroup object. |
WorkflowGroupCreatedNotification |
| Published when GroupService.CreateUserGroupAsync is called in the API after the entity has been created. CreatedEntity: Gets the created IWorkflowGroup object. |
WorkflowGroupDeletingNotification |
| Published when GroupService.DeleteUserGroupAsync is called in the API before the group is deleted. DeletedEntities: Gets the collection of IWorkflowGroup objects being deleted. |
WorkflowGroupDeletedNotification |
| Published when GroupService.DeleteUserGroupAsync is called in the API after the group is deleted. DeletedEntities: Gets the collection of deleted IWorkflowGroup objects. |
WorkflowGroupSavingNotification |
| Published when GroupService.UpdateUserGroupAsync is called in the API before the group is updated. SavedEntities: Gets the collection of IWorkflowGroup objects being saved. |
WorkflowGroupSavedNotification |
| Published when GroupService.UpdateUserGroupAsync is called in the API after the group is updated. SavedEntities: Gets the collection of saved IWorkflowGroup objects. |
WorkflowProcess Notifications
Notification | Members | Description |
---|---|---|
WorkflowInstanceApprovingNotification |
| Published when WorkflowProcess.ActionWorkflow is called in the API before the workflow stage is approved. Target: Gets the IWorkflowInstance object being approved. Action: Gets the WorkflowAction being executed. Will be WorkflowAction.Approve. |
WorkflowInstanceApprovedNotification |
| Published when WorkflowProcess.ActionWorkflow is called in the API after the workflow stage is approved. Target: Gets the approved IWorkflowInstance object. Action: Gets the WorkflowAction being executed. Will be WorkflowAction.Approve. |
WorkflowInstanceCancellingNotification |
| Published when WorkflowProcess.ActionWorkflow is called in the API before the workflow stage is cancelled. Target: Gets the IWorkflowInstance object being cancelled. Action: Gets the WorkflowAction being executed. Will be WorkflowAction.Cancel. |
WorkflowInstanceCancelledNotification |
| Published when WorkflowProcess.ActionWorkflow is called in the API after the workflow stage is cancelled. Target: Gets the cancelled IWorkflowInstance object. Action: Gets the WorkflowAction being executed. Will be WorkflowAction.Cancel. |
WorkflowInstanceCompletedNotification |
| Published when WorkflowProcess.HandleCompleteNow or WorkflowProcess.HandleCompleteLater is called in the API after the workflow is completed. Target: Gets the completed IWorkflowInstance object. WorkflowType: Gets the WorkflowType enum value representing the workflow type. Will be either Publish or Unpublish. |
WorkflowInstanceCreatingNotification |
| Published when WorkflowProcess.InitiateWorkflow is called in the API before the workflow is initiated. CreatedEntity: Gets the IWorkflowInstance object being created. |
WorkflowInstanceCreatedNotification |
| Published when WorkflowProcess.InitiateWorkflow is called in the API after the workflow is initiated. CreatedEntity: Gets the created IWorkflowInstance object. |
WorkflowInstanceRejectingNotification |
| Published when WorkflowProcess.ActionWorkflow is called in the API before the workflow stage is rejected. Target: Gets the IWorkflowInstance object being rejected. Action: Gets the WorkflowAction being executed. Will be WorkflowAction.Reject. |
WorkflowInstanceRejectedNotification |
| Published when WorkflowProcess.ActionWorkflow is called in the API after the workflow stage is rejected. Target: Gets the rejected IWorkflowInstance object. Action: Gets the WorkflowAction being executed. Will be WorkflowAction.Reject. |
WorkflowInstanceResubmittingNotification |
| Published when WorkflowProcess.ResubmitWorkflow is called in the API before the workflow stage is resubmitted. Target: Gets the IWorkflowInstance object being resubmitted. Action: Gets the WorkflowAction being executed. Will be WorkflowAction.Resubmit. |
WorkflowInstanceResubmittedNotification |
| Published when WorkflowProcess.ResubmitWorkflow is called in the API after the workflow stage is resubmitted. Target: Gets the resubmitted IWorkflowInstance object. Action: Gets the WorkflowAction being executed. Will be WorkflowAction.Resubmit. |
WorkflowInstanceUpdatingNotification |
| Base notification class for Approving, Cancelling, Creating, Rejecting, Resubmitting. Can be used in place of these, using the Action value to identify the executed workflow action. Published when WorkflowProcess.ResubmitWorkflow is called in the API before the workflow is updated. Target: Gets the IWorkflowInstance object being updated. Action: Gets the WorkflowAction being executed. |
WorkflowInstanceUpdatedNotification |
| Base notification class for Approved, Cancelled, Created, Rejected, Resubmitted. Can be used in place of these, using the Action value to identify the executed workflow action. Published when WorkflowProcess.ResubmitWorkflow is called in the API after the workflow stage is updated. Target: Gets the updated IWorkflowInstance objects. Action: Gets the WorkflowAction being executed. |
WorkflowResubmitTaskCreatingNotification |
| Published when WorkflowProcess.ResubmitWorkflow is called in the API before the workflow task is persisted. CreatedEntity: Gets the IWorkflowTask object being created. |
WorkflowResubmitTaskCreatedNotification |
| Published when WorkflowProcess.ResubmitWorkflow is called in the API after the workflow task is persisted. CreatedEntity: Gets the created IWorkflowTask. |
WorkflowTaskCreatingNotification |
| Published when WorkflowTaskManager.CreateApprovalTask is called in the API before the workflow task is persisted. CreatedEntity: Gets the IWorkflowTask object being created. |
WorkflowTaskCreatedNotification |
| Published when WorkflowTaskManager.CreateApprovalTask is called in the API after the workflow task is persisted. CreatedEntity: Gets the created IWorkflowTask. |
WorkflowTaskUpdatingNotification |
| Published when WorkflowTaskManager.ResubmitWorkflow is called in the API before the workflow task is updated. CreatedEntity: Gets the IWorkflowTask object being updated. |
WorkflowTaskUpdatedNotification |
| Published when WorkflowTaskManager.ResubmitWorkflow is called in the API after the workflow task is updated. CreatedEntity: Gets the updated IWorkflowTask. |
SettingsService Notifications
Notification | Members | Description |
---|---|---|
WorkflowSettingsSavingNotification |
| Published when SettingsService.UpdateSettings is called in the API before the settings are saved. SavedEntities: Gets the collection of ISettings objects being saved. |
WorkflowSettingsSavedNotification |
| Published when SettingsService.UpdateSettings SavedEntities: Gets the collection of saved ISettings objects. |
Last updated