From daa7c75ca04e67dd6be3ecebcb0b62762e30d025 Mon Sep 17 00:00:00 2001 From: Matt Earnshaw Date: Mon, 26 Jun 2017 15:56:21 +0100 Subject: [PATCH 1/3] initialize uninitialized variables (fixes geppetto-osb/#37) --- .../java/org/geppetto/simulation/manager/RuntimeExperiment.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/java/org/geppetto/simulation/manager/RuntimeExperiment.java b/src/main/java/org/geppetto/simulation/manager/RuntimeExperiment.java index 9456def..6852c9d 100644 --- a/src/main/java/org/geppetto/simulation/manager/RuntimeExperiment.java +++ b/src/main/java/org/geppetto/simulation/manager/RuntimeExperiment.java @@ -306,6 +306,8 @@ public ExperimentState getExperimentState(List variables,String urlBase) ExperimentState experimentStateTransfer = GeppettoFactory.eINSTANCE.createExperimentState(); experimentStateTransfer.setExperimentId(experiment.getId()); experimentStateTransfer.setProjectId(experiment.getParentProject().getId()); + experimentState.setExperimentId(experiment.getId()); + experimentState.setProjectId(experiment.getParentProject().getId()); for(ISimulationResult result : experiment.getSimulationResults()) { From c2e562ea3d43f2ba95f9c6fd080da025666c26af Mon Sep 17 00:00:00 2001 From: Matt Earnshaw Date: Thu, 28 Sep 2017 18:34:26 +0100 Subject: [PATCH 2/3] better solution --- .../org/geppetto/simulation/manager/GeppettoManager.java | 8 ++++++++ .../geppetto/simulation/manager/RuntimeExperiment.java | 2 -- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/geppetto/simulation/manager/GeppettoManager.java b/src/main/java/org/geppetto/simulation/manager/GeppettoManager.java index 5949913..3dfe4cc 100644 --- a/src/main/java/org/geppetto/simulation/manager/GeppettoManager.java +++ b/src/main/java/org/geppetto/simulation/manager/GeppettoManager.java @@ -368,6 +368,14 @@ public void persistProject(String requestId, IGeppettoProject project) throws Ge // since it's id based DataManagerHelper.getDataManager().addGeppettoProject(project, getUser()); + // update the ids of ExperimentState objects + RuntimeProject runtimeProject = getRuntimeProject(project); + for (IExperiment experiment : project.getExperiments()) { + ExperimentState experimentState = runtimeProject.getRuntimeExperiment(experiment).getExperimentState(); + experimentState.setExperimentId(experiment.getId()); + experimentState.setProjectId(project.getId()); + } + URL url = URLReader.getURL(project.getGeppettoModel().getUrl(), project.getBaseURL()); Path localGeppettoModelFile = Paths.get(URLReader.createLocalCopy(scope, project.getId(), url, true).toURI()); diff --git a/src/main/java/org/geppetto/simulation/manager/RuntimeExperiment.java b/src/main/java/org/geppetto/simulation/manager/RuntimeExperiment.java index d2c2452..d374d09 100644 --- a/src/main/java/org/geppetto/simulation/manager/RuntimeExperiment.java +++ b/src/main/java/org/geppetto/simulation/manager/RuntimeExperiment.java @@ -275,8 +275,6 @@ public ExperimentState getExperimentState(List variables,String urlBase) ExperimentState experimentStateTransfer = GeppettoFactory.eINSTANCE.createExperimentState(); experimentStateTransfer.setExperimentId(experiment.getId()); experimentStateTransfer.setProjectId(experiment.getParentProject().getId()); - experimentState.setExperimentId(experiment.getId()); - experimentState.setProjectId(experiment.getParentProject().getId()); for(ISimulationResult result : experiment.getSimulationResults()) { From 88933a2693b1111934360623cda5db69c155c068 Mon Sep 17 00:00:00 2001 From: Matteo Cantarelli Date: Tue, 24 Oct 2017 14:46:10 +0100 Subject: [PATCH 3/3] Release 0.3.8 --- pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pom.xml b/pom.xml index 7e74068..fbc89ed 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.geppetto simulation Geppetto Simulation Bundle - 0.3.7 + 0.3.8 bundle 3.1.3.RELEASE