Skip to content
Snippets Groups Projects
Commit 4e000b95 authored by Henning Josef Moritz Werner Schmeink's avatar Henning Josef Moritz Werner Schmeink
Browse files

added getUpdatedBPMNFlowSet

+ new path for rest
+ static path of the updated bpmn-file
parent 884c65e5
No related branches found
No related tags found
No related merge requests found
......@@ -38,6 +38,28 @@ public class FileController {
return bpmnContent;
}
/*
* getUpdatedBPMNFlowSet()
* # FE2021
* # Wir benötigt um das neue BPMN-Modell einzulesen
*/
@RequestMapping(path = "/project/{projectId}/update/bpmn/x", method = RequestMethod.GET)
public String getUpdatedBPMNFlowSet(@PathVariable(required = true) Long projectId) {
Project projectForId = projectService.getProjectForId(projectId);
// TODO: Update-Datei, muss noch ins Versionierungskonzept eingearbeitet werden
String rootPath = projectForId.getProjectDirectories().getProjectRootPath(); // D:\Eclipse orkspace\bpmn-testgenerator-tool-master\OnlineSchuhDemo
// Hardcoded, die Funktion getBpmnFiles() findet nicht mehrere bpmn dateien sonder nur eine
String bpmnPath = "src\\main\\resources\\test.bpmn";
Path bpmn = Paths.get(rootPath, bpmnPath);
File bpmnFile = new File(bpmn.toString());
String bpmnContent = readFile(bpmnFile);
return bpmnContent;
}
private String readFile(File bpmnFile) {
try {
return FileUtils.readFileToString(bpmnFile, "UTF-8");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment