in service/src/main/java/org/apache/fineract/cn/group/internal/command/handler/GroupAggregate.java [240:251]
public String closeGroup(final CloseGroupCommand closeGroupCommand) {
this.groupRepository.findByIdentifier(closeGroupCommand.identifier())
.ifPresent(groupEntity -> {
final List<MeetingEntity> currentMeetings =
this.meetingRepository.findByGroupEntityAndCurrentCycleOrderByMeetingSequenceDesc(groupEntity, groupEntity.getCurrentCycle());
if (currentMeetings.stream().anyMatch(meetingEntity -> meetingEntity.getHeldOn() == null)) {
throw ServiceException.conflict("Not all meetings for group {0} signed off.", closeGroupCommand.identifier());
}
this.processCommandInternally(groupEntity, closeGroupCommand.groupCommand());
});
return closeGroupCommand.identifier();
}