from("direct:trainee")
.multicast(AGGREGATOR)
.parallelProcessing()
.to("direct:trainee-details")
.to("direct:traineenotes-get")
.to("direct:gmc-doctors-by-ids");
from("direct:trainee-details")
.setHeader(OIDC_ACCESS_TOKEN_HEADER).method(keycloakBean, GET_TOKEN_METHOD)
.setHeader("gmcId").method(gmcIdProcessorBean, "getGmcIdOfRecommendationTrainee")
.setHeader(AggregationKey.HEADER).constant("programme")
.toD(serviceUrl + API_TRAINEE);
from("direct:traineenotes-get")
.setHeader(AggregationKey.HEADER).constant("notes")
.toD(coreServiceUrl + API_TRAINEENOTES);
from("direct:gmc-doctors-by-ids")
.setHeader(AggregationKey.HEADER).constant("doctor")
.setHeader("gmcIds").method(gmcIdProcessorBean, "getHiddenGmcIds")
.toD(recommendationServiceUrl + GET_DOCTORS_BY_GMC_IDS); |