Search in sources :

Example 1 with AggUserNotified

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);
}
Also used : UserId(io.spine.core.UserId) AggUserNotified(io.spine.test.aggregate.event.AggUserNotified) AggTaskId(io.spine.test.aggregate.task.AggTaskId) React(io.spine.core.React)

Aggregations

React (io.spine.core.React)1 UserId (io.spine.core.UserId)1 AggUserNotified (io.spine.test.aggregate.event.AggUserNotified)1 AggTaskId (io.spine.test.aggregate.task.AggTaskId)1