Annotation Interface AssigneeField


@Documented @Retention(RUNTIME) @Target(FIELD) public @interface AssigneeField
Marks a Ref<> attribute as the entity's assignee: the user who owns or is responsible for the record. When the built-in assignment producer is enabled (onno.notifications.assignments.enabled, default true) and such a field is set to — or changed to point at — a user, that user is sent a notification that the record was assigned to them.

Put it on the attribute whose target is (or resolves to) the identity catalog linked by Layout.identity(...). It is purely a notification hint — it does not change the field's storage, validation, or UI — so an app that doesn't use notifications can ignore it:


 @Document(name = "Tasks")
 public class Task extends DocumentObject {
     @AssigneeField
     @Attribute private Ref<Employee> assignedTo;   // setting this notifies the employee
 }
 

At most one attribute per entity is treated as the assignee; if several are annotated the first declared wins.