Notification notification =
NotificationSerializer
.instance()
.deserialize(aTextMessage, Notification.class);
ProductDiscussionRequestTimedOut event = notification.event();
if (event.hasFullyTimedOut()) {
this.productApplicationService().timeOutProductDiscussionRequest(
new TimeOutProductDiscussionRequestCommand(
event.tenantId(),
event.processId().id(),
event.occurredOn()));
} else {
this.productApplicationService().retryProductDiscussionRequest(
new RetryProductDiscussionRequestCommand(
event.tenantId(),
event.processId().id()));
}
}