diff --git a/src/main/java/org/gridsuite/ds/server/service/contexts/DynamicSimulationResultContext.java b/src/main/java/org/gridsuite/ds/server/service/contexts/DynamicSimulationResultContext.java index 7cd4888..c8b02a8 100644 --- a/src/main/java/org/gridsuite/ds/server/service/contexts/DynamicSimulationResultContext.java +++ b/src/main/java/org/gridsuite/ds/server/service/contexts/DynamicSimulationResultContext.java @@ -17,6 +17,7 @@ import java.io.UncheckedIOException; import java.util.Map; import java.util.Objects; +import java.util.Optional; import java.util.UUID; import static com.powsybl.ws.commons.computation.service.NotificationService.*; @@ -55,6 +56,7 @@ public static DynamicSimulationResultContext fromMessage(Message message String reporterId = (String) headers.get(REPORTER_ID_HEADER); String reportType = (String) headers.get(REPORT_TYPE_HEADER); String userId = (String) headers.get(HEADER_USER_ID); + Boolean debug = (Boolean) headers.get(DEBUG_HEADER); DynamicSimulationRunContext runContext = DynamicSimulationRunContext.builder() .networkUuid(networkUuid) @@ -64,6 +66,7 @@ public static DynamicSimulationResultContext fromMessage(Message message .reportInfos(ReportInfos.builder().reportUuid(reportUuid).reporterId(reporterId).computationType(reportType).build()) .userId(userId) .parameters(parametersInfos) + .debug(Optional.ofNullable(debug).orElse(false)) .build(); // specific headers for dynamic simulation