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

NotificationMembersDescription

WorkflowContentReviewsConfigSavingNotification

  • IEnumerable SavedEntities

  • EventMessages Messages

  • IDictionary<string,object> State

  • bool Cancel

Published when ContentReviewService.SaveContentReviewConfig is called in the API. SavedEntities: Gets the collection of IWorkflowConfig objects being saved.

WorkflowContentReviewsConfigSavedNotification

  • IEnumerable SavedEntities

  • EventMessages Messages

  • IDictionary<string,object> State

Published when ContentReviewService.SaveContentReviewConfig is called in the API after the entities have been saved. SavedEntities: Gets the collection of saved IWorkflowConfig objects.

WorkflowContentReviewsEmailNotificationsSendingNotification

  • Dictionary<UserGroupPoco, List<ContentReviewConfigPoco>> Target

  • EventMessages Messages

  • IDictionary<string,object> State

  • bool Cancel

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

  • Dictionary<UserGroupPoco, List<ContentReviewConfigPoco>> Target

  • EventMessages Messages

  • IDictionary<string,object> State

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

  • ContentReviewNodePoco Target

  • EventMessages Messages

  • IDictionary<string,object> State

  • bool Cancel

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

  • ContentReviewNodePoco Target

  • EventMessages Messages

  • IDictionary<string,object> State

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

NotificationMembersDescription

WorkflowContentTypeConfigDeletingNotification

  • IEnumerable<IWorkflowConfig> DeletedEntities

  • EventMessages Messages

  • IDictionary<string,object> State

  • bool Cancel

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

  • IEnumerable<IWorkflowConfig> DeletedEntities

  • EventMessages Messages

  • IDictionary<string,object> State

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

  • IEnumerable<IWorkflowConfig> SavedEntities

  • EventMessages Messages

  • IDictionary<string,object> State

  • bool Cancel

Published when ConfigService.UpdateContentTypeConfig is called in the API. SavedEntities: Gets the collection of IWorkflowConfig objects being saved.

WorkflowContentTypeConfigSavedNotification

  • IEnumerable<IWorkflowConfig> SavedEntities

  • EventMessages Messages

  • IDictionary<string,object> State

Published when ConfigService.UpdateContentTypeConfig is called in the API after the entities have been saved. SavedEntities: Gets the collection of saved IWorkflowConfig objects.

WorkflowNodeConfigDeletingNotification

  • IEnumerable<IWorkflowConfig> DeletedEntities

  • EventMessages Messages

  • IDictionary<string,object> State

  • bool Cancel

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

  • IEnumerable<IWorkflowConfig> DeletedEntities

  • EventMessages Messages

  • IDictionary<string,object> State

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

  • IEnumerable<IWorkflowConfig> SavedEntities

  • EventMessages Messages

  • IDictionary<string,object> State

  • bool Cancel

Published when ConfigService.UpdateNodeConfig is called in the API. SavedEntities: Gets the collection of IWorkflowConfig objects being saved.

WorkflowNodeConfigSavedNotification

  • IEnumerable<IWorkflowConfig> SavedEntities

  • EventMessages Messages

  • IDictionary<string,object> State

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

NotificationMembersDescription

WorkflowEmailNotificationsSendingNotification

  • IEnumerable<IWorkflowInstance> Target

  • EmailType EmailType

  • EventMessages Messages

  • IDictionary<string,object> State

  • bool Cancel

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

  • IHtmlEmailModel Target

  • List<EmailUserModel> Recipients

  • EmailType EmailType

  • EventMessages Messages

  • IDictionary<string,object> State

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

  • IEnumerable<IWorkflowInstance> Target

  • EmailType EmailType

  • EventMessages Messages

  • IDictionary<string,object> State

  • bool Cancel

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 EmailType.Reminder

WorkflowEmailRemindersSentNotification

  • IEnumerable<IWorkflowInstance> Target

  • List&EmailTaskListModel> Tasks

  • EmailType EmailType

  • EventMessages Messages

  • IDictionary<string,object> State

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 EmailType.Reminder

GroupService Notifications

NotificationMembersDescription

WorkflowGroupCreatingNotification

  • IWorkflowGroup SavedEntities

  • EventMessages Messages

  • IDictionary<string,object> State

  • bool Cancel

Published when GroupService.CreateUserGroupAsync is called in the API before the entity is created. CreatedEntity: Gets the created IWorkflowGroup object.

WorkflowGroupCreatedNotification

  • IWorkflowGroup SavedEntities

  • EventMessages Messages

  • IDictionary<string,object> State

Published when GroupService.CreateUserGroupAsync is called in the API after the entity has been created. CreatedEntity: Gets the created IWorkflowGroup object.

WorkflowGroupDeletingNotification

  • IEnumerable<IWorkflowGroup> DeletedEntities

  • EventMessages Messages

  • IDictionary<string,object> State

  • bool Cancel

Published when GroupService.DeleteUserGroupAsync is called in the API before the group is deleted. DeletedEntities: Gets the collection of IWorkflowGroup objects being deleted.

WorkflowGroupDeletedNotification

  • IEnumerable<IWorkflowGroup> DeletedEntities

  • EventMessages Messages

  • IDictionary<string,object> State

Published when GroupService.DeleteUserGroupAsync is called in the API after the group is deleted. DeletedEntities: Gets the collection of deleted IWorkflowGroup objects.

WorkflowGroupSavingNotification

  • IEnumerable<IWorkflowGroup> SavedEntities

  • EventMessages Messages

  • IDictionary<string,object> State

  • bool Cancel

Published when GroupService.UpdateUserGroupAsync is called in the API before the group is updated. SavedEntities: Gets the collection of IWorkflowGroup objects being saved.

WorkflowGroupSavedNotification

  • IEnumerable<IWorkflowGroup> SavedEntities

  • EventMessages Messages

  • IDictionary<string,object> State

Published when GroupService.UpdateUserGroupAsync is called in the API after the group is updated. SavedEntities: Gets the collection of saved IWorkflowGroup objects.

WorkflowProcess Notifications

NotificationMembersDescription

WorkflowInstanceApprovingNotification

  • IWorkflowInstance Target

  • WorkflowAction Action

  • EventMessages Messages

  • IDictionary<string,object> State

  • bool Cancel

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

  • IWorkflowInstance Target

  • WorkflowAction Action

  • EventMessages Messages

  • IDictionary<string,object> State

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

  • IWorkflowInstance Target

  • WorkflowAction Action

  • EventMessages Messages

  • IDictionary<string,object> State

  • bool Cancel

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

  • IWorkflowInstance Target

  • WorkflowAction Action

  • EventMessages Messages

  • IDictionary<string,object> State

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

  • IWorkflowInstance Target

  • WorkflowType WorkflowType

  • EventMessages Messages

  • IDictionary<string,object> State

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

  • IWorkflowInstance CreatedEntity

  • EventMessages Messages

  • IDictionary<string,object> State

  • bool Cancel

Published when WorkflowProcess.InitiateWorkflow is called in the API before the workflow is initiated. CreatedEntity: Gets the IWorkflowInstance object being created.

WorkflowInstanceCreatedNotification

  • IWorkflowInstance CreatedEntity

  • EventMessages Messages

  • IDictionary<string,object> State

Published when WorkflowProcess.InitiateWorkflow is called in the API after the workflow is initiated. CreatedEntity: Gets the created IWorkflowInstance object.

WorkflowInstanceRejectingNotification

  • IWorkflowInstance Target

  • WorkflowAction Action

  • EventMessages Messages

  • IDictionary<string,object> State

  • bool Cancel

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

  • IWorkflowInstance Target

  • WorkflowAction Action

  • EventMessages Messages

  • IDictionary<string,object> State

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

  • IWorkflowInstance Target

  • WorkflowAction Action

  • EventMessages Messages

  • IDictionary<string,object> State

  • bool Cancel

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

  • IWorkflowInstance Target

  • WorkflowAction Action

  • EventMessages Messages

  • IDictionary<string,object> State

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

  • IWorkflowInstance Target

  • WorkflowAction Action

  • EventMessages Messages

  • IDictionary<string,object> State

  • bool Cancel

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

  • IWorkflowInstance Target

  • WorkflowAction Action

  • EventMessages Messages

  • IDictionary<string,object> State

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

  • IWorkflowInstance CreatedEntity

  • EventMessages Messages

  • IDictionary<string,object> State

  • bool Cancel

Published when WorkflowProcess.ResubmitWorkflow is called in the API before the workflow task is persisted. CreatedEntity: Gets the IWorkflowTask object being created.

WorkflowResubmitTaskCreatedNotification

  • IWorkflowInstance CreatedEntity

  • EventMessages Messages

  • IDictionary<string,object> State

Published when WorkflowProcess.ResubmitWorkflow is called in the API after the workflow task is persisted. CreatedEntity: Gets the created IWorkflowTask.

WorkflowTaskCreatingNotification

  • IWorkflowInstance CreatedEntity

  • EventMessages Messages

  • IDictionary<string,object> State

  • bool Cancel

Published when WorkflowTaskManager.CreateApprovalTask is called in the API before the workflow task is persisted. CreatedEntity: Gets the IWorkflowTask object being created.

WorkflowTaskCreatedNotification

  • IWorkflowInstance CreatedEntity

  • EventMessages Messages

  • IDictionary<string,object> State

Published when WorkflowTaskManager.CreateApprovalTask is called in the API after the workflow task is persisted. CreatedEntity: Gets the created IWorkflowTask.

WorkflowTaskUpdatingNotification

  • IWorkflowInstance Target

  • EventMessages Messages

  • IDictionary<string,object> State

  • bool Cancel

Published when WorkflowTaskManager.ResubmitWorkflow is called in the API before the workflow task is updated. CreatedEntity: Gets the IWorkflowTask object being updated.

WorkflowTaskUpdatedNotification

  • IWorkflowInstance Target

  • EventMessages Messages

  • IDictionary<string,object> State

Published when WorkflowTaskManager.ResubmitWorkflow is called in the API after the workflow task is updated. CreatedEntity: Gets the updated IWorkflowTask.

SettingsService Notifications

NotificationMembersDescription

WorkflowSettingsSavingNotification

  • IEnumerable<ISettings> SavedEntities

  • EventMessages Messages

  • IDictionary<string,object> State

  • bool Cancel

Published when SettingsService.UpdateSettings is called in the API before the settings are saved. SavedEntities: Gets the collection of ISettings objects being saved.

WorkflowSettingsSavedNotification

  • IEnumerable<ISettings> SavedEntities

  • EventMessages Messages

  • IDictionary<string,object> State

Published when SettingsService.UpdateSettings SavedEntities: Gets the collection of saved ISettings objects.

Last updated