use of io.spine.test.aggregate.event.AggUserNotified in project core-java by SpineEventEngine.
the class TaskAggregate method on.
@React
Pair<AggUserNotified, Optional<AggUserNotified>> on(AggTaskAssigned event) {
final AggTaskId taskId = event.getTaskId();
final UserId previousAssignee = event.getPreviousAssignee();
final AggUserNotified previousAssigneeNotified = userNotifiedOrNull(taskId, previousAssignee);
final UserId newAssignee = event.getNewAssignee();
final AggUserNotified newAssigneeNotified = userNotified(taskId, newAssignee);
return Pair.withNullable(newAssigneeNotified, previousAssigneeNotified);
}
Aggregations