I have a list of SubDTO class and for each SubDTO class I want to get the datetimeoffset and set decision date, however the function from decisionService.getBySubId returns mono object, I dont know how to convert mono to datetimeoffset?
List<SubDTO> hits = [Subto1, subto2]
public class SubDTO{
private UUID Id;
private OffsetDateTime decisionDate;
}
hits.forEach(currentItem-> currentItem.setDecisionDate(
decisionService.getBySubId(currentItem.getId(), currentItem.getTenantId())
//error on below line because it returns mono<datetimeoffset> but setter expects datetimeoffset rather mono
.map(decisionDto -> decisionDto.getDecisionDate())
);