Skip to main content
Atoti Sign-Off uses the Notification Service to send notifications to the UI. Out of the box, Atoti Sign-Off will send notifications:
  • to users with the role ROLE_ADMIN when the initial data load completes. This is configurable in the application.yml file using the sign-off.notification.server-started-notification-user-role property.
  • to users specified as Approvers when 4-eyes tasks require approval
  • to all users involved in the task when an export succeeds or fails
In order to send custom notifications, follow these steps:

1. Inject the INotificationService bean into your class

The INotificationService is a convenience service that helps publish the events that the notification service listens for. To use it, inject it into the component that needs to send notifications:
OR

2. Create and publish your notifications

With the service wired up, you can now create and publish notifications. The Notification class is a simple POJO that represents a notification. Use one of the class’s builder methods to create Notification objects:
  • Notification.notificationWithDefaultActionsBuilder(): Creates a notification with the default actions. For more information, see Notification actions. This is the recommended builder to use in most scenarios.
  • Notification.builder(): Creates a bare notification with no actions.
Once you have chosen the builder method to use, create the notification:
With your notification created, you can now publish it using the INotificationService:
That’s it - your notification has been published and will be visible in the Atoti Sign-Off UI.

Notification actions

Notifications can have actions that users can take when they receive them. Instances of the NotificationAction class represent one of these actions that can be taken on a notification. The following default actions are provided when using the Notification.notificationWithDefaultActionsBuilder() method:
  • MARK_READ: Marks the notification as read. Only enabled if the notification is unread (isRead=false).
  • MARK_UNREAD: Marks the notification as unread. Only enabled if the notification is read (isRead=true).
  • DELETE: Deletes the notification.

Restrict notifications to specific users

By default, notifications are sent to all users. If you want to restrict a notification to only be sent to specific users, you can do so by setting the users or userRoles fields:
Most use cases should only use one of these fields. If both are set, the notification will only be sent to users who are in the users list AND have one of the roles in userRoles.

Notification Service properties

The Notification Service contains the following properties that can be configured in your application.yml file: