use of org.jboss.pnc.api.dto.Request in project pnc by project-ncl.
the class DeliverableAnalyzerManagerImpl method startAnalysis.
private void startAnalysis(String milestoneId, List<String> sourcesLink, Base32LongID operationId) {
Request callback = operationsManager.getOperationCallback(operationId);
String id = operationId.getId();
try (RestConnector restConnector = new RestConnector(bpmConfig)) {
AnalyzeDeliverablesBpmRequest bpmRequest = new AnalyzeDeliverablesBpmRequest(id, milestoneId, sourcesLink);
AnalyzeDeliverablesTask analyzeTask = new AnalyzeDeliverablesTask(bpmRequest, callback);
restConnector.startProcess(bpmConfig.getAnalyzeDeliverablesBpmProcessId(), analyzeTask, id, userService.currentUserToken());
DeliverableAnalysisStatusChangedEvent analysisStatusChanged = DefaultDeliverableAnalysisStatusChangedEvent.started(id, milestoneId, sourcesLink);
analysisStatusChangedEventNotifier.fire(analysisStatusChanged);
} catch (ProcessManagerException e) {
log.error("Error trying to start analysis of deliverables task for milestone: {}", milestoneId, e);
throw new RuntimeException(e);
}
}
Aggregations