diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
index ae4a389d..e5ddf0e8 100644
--- a/.github/workflows/maven.yml
+++ b/.github/workflows/maven.yml
@@ -21,13 +21,27 @@ jobs:
steps:
- uses: actions/checkout@v4
+
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
cache: maven
- - name: Build with Maven
+
+ - name: Clone BPM
+ uses: actions/checkout@master
+ with:
+ repository: InseeFr/BPM
+ path: bpm
+
+ - name: Build BPM
+ run: |
+ cd bpm
+ mvn clean install
+ cd ..
+
+ - name: Build Genesis with Maven
run: mvn -B package --file pom.xml
# Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
diff --git a/pom.xml b/pom.xml
index 0030c15a..5926584b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -131,6 +131,13 @@
junit-vintage-engine
test
+
+
+
+ fr.insee.bpm
+ bpm
+ 1.0.0
+
diff --git a/src/main/java/fr/insee/genesis/controller/adapter/LunaticXmlAdapter.java b/src/main/java/fr/insee/genesis/controller/adapter/LunaticXmlAdapter.java
index 296ce529..e56c7793 100644
--- a/src/main/java/fr/insee/genesis/controller/adapter/LunaticXmlAdapter.java
+++ b/src/main/java/fr/insee/genesis/controller/adapter/LunaticXmlAdapter.java
@@ -1,11 +1,16 @@
package fr.insee.genesis.controller.adapter;
-import fr.insee.genesis.controller.sources.ddi.VariablesMap;
import fr.insee.genesis.controller.sources.xml.LunaticXmlCollectedData;
import fr.insee.genesis.controller.sources.xml.LunaticXmlSurveyUnit;
import fr.insee.genesis.controller.sources.xml.ValueType;
import fr.insee.genesis.controller.utils.LoopIdentifier;
-import fr.insee.genesis.domain.dtos.*;
+
+import fr.insee.genesis.domain.dtos.CollectedVariableDto;
+import fr.insee.genesis.domain.dtos.DataState;
+import fr.insee.genesis.domain.dtos.Mode;
+import fr.insee.genesis.domain.dtos.SurveyUnitUpdateDto;
+import fr.insee.genesis.domain.dtos.VariableDto;
+import fr.insee.bpm.metadata.model.VariablesMap;
import lombok.experimental.UtilityClass;
import java.time.LocalDateTime;
diff --git a/src/main/java/fr/insee/genesis/controller/rest/ResponseController.java b/src/main/java/fr/insee/genesis/controller/rest/ResponseController.java
index 992d45e5..4c941e96 100644
--- a/src/main/java/fr/insee/genesis/controller/rest/ResponseController.java
+++ b/src/main/java/fr/insee/genesis/controller/rest/ResponseController.java
@@ -5,8 +5,6 @@
import fr.insee.genesis.controller.responses.SurveyUnitUpdateSimplified;
import fr.insee.genesis.controller.service.SurveyUnitQualityService;
import fr.insee.genesis.controller.service.VolumetryLogService;
-import fr.insee.genesis.controller.sources.ddi.DDIReader;
-import fr.insee.genesis.controller.sources.ddi.VariablesMap;
import fr.insee.genesis.controller.sources.xml.LunaticXmlCampaign;
import fr.insee.genesis.controller.sources.xml.LunaticXmlDataParser;
import fr.insee.genesis.controller.sources.xml.LunaticXmlDataSequentialParser;
@@ -25,11 +23,16 @@
import fr.insee.genesis.exceptions.GenesisException;
import fr.insee.genesis.exceptions.NoDataError;
import fr.insee.genesis.infrastructure.utils.FileUtils;
+
+import fr.insee.bpm.exceptions.MetadataParserException;
+import fr.insee.bpm.metadata.model.VariablesMap;
+import fr.insee.bpm.metadata.reader.ddi.DDIReader;
+
import io.swagger.v3.oas.annotations.Operation;
import lombok.extern.slf4j.Slf4j;
+
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
-import org.springframework.http.HttpStatusCode;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.DeleteMapping;
@@ -87,9 +90,11 @@ public ResponseEntity