|
3 | 3 | import jakarta.enterprise.context.ApplicationScoped;
|
4 | 4 | import jakarta.inject.Inject;
|
5 | 5 | import org.eclipse.microprofile.config.inject.ConfigProperty;
|
| 6 | +import org.jboss.pnc.common.log.MDCUtils; |
6 | 7 | import org.jboss.pnc.dingrogu.api.client.RexClient;
|
7 | 8 | import org.jboss.pnc.dingrogu.api.dto.CorrelationId;
|
8 | 9 | import org.jboss.pnc.dingrogu.api.dto.adapter.DeliverablesAnalyzerDTO;
|
9 | 10 | import org.jboss.pnc.dingrogu.api.dto.adapter.OrchDeliverablesAnalyzerResultDTO;
|
10 | 11 | import org.jboss.pnc.dingrogu.api.dto.workflow.DeliverablesAnalysisWorkflowDTO;
|
11 | 12 | import org.jboss.pnc.dingrogu.restadapter.adapter.DeliverablesAnalyzerAdapter;
|
12 | 13 | import org.jboss.pnc.dingrogu.restadapter.adapter.OrchDeliverablesAnalyzerResultAdapter;
|
| 14 | +import org.jboss.pnc.rex.dto.ConfigurationDTO; |
13 | 15 | import org.jboss.pnc.rex.dto.CreateTaskDTO;
|
14 | 16 | import org.jboss.pnc.rex.dto.EdgeDTO;
|
15 | 17 | import org.jboss.pnc.rex.dto.requests.CreateGraphRequest;
|
@@ -64,7 +66,14 @@ public CorrelationId submitWorkflow(DeliverablesAnalysisWorkflowDTO dto) throws
|
64 | 66 | EdgeDTO edgeDTO = EdgeDTO.builder().source(taskResult.name).target(taskAnalyze.name).build();
|
65 | 67 | Set<EdgeDTO> edges = Set.of(edgeDTO);
|
66 | 68 |
|
67 |
| - CreateGraphRequest graphRequest = new CreateGraphRequest(correlationId.getId(), null, edges, vertices); |
| 69 | + ConfigurationDTO configurationDTO = ConfigurationDTO.builder() |
| 70 | + .mdcHeaderKeyMapping(MDCUtils.HEADER_KEY_MAPPING) |
| 71 | + .build(); |
| 72 | + CreateGraphRequest graphRequest = new CreateGraphRequest( |
| 73 | + correlationId.getId(), |
| 74 | + configurationDTO, |
| 75 | + edges, |
| 76 | + vertices); |
68 | 77 | rexClient.submitWorkflow(graphRequest);
|
69 | 78 |
|
70 | 79 | return correlationId;
|
|
0 commit comments