X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=org.argeo.slc.server%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fslc%2Fws%2Fprocess%2FSlcExecutionStepsRequestEp.java;fp=org.argeo.slc.server%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fslc%2Fws%2Fprocess%2FSlcExecutionStepsRequestEp.java;h=738c2c69966afc0fc7acaa56a6261da5747d5738;hb=c21f3ae9746cd2bbc81dad813e9e590300433a52;hp=56532d4ca3e35daa03025659e73948879d0ea7ce;hpb=7c371ee1cc4bbf7c751828e492215a1321bda9d0;p=gpl%2Fargeo-slc.git diff --git a/org.argeo.slc.server/src/main/java/org/argeo/slc/ws/process/SlcExecutionStepsRequestEp.java b/org.argeo.slc.server/src/main/java/org/argeo/slc/ws/process/SlcExecutionStepsRequestEp.java index 56532d4ca..738c2c699 100644 --- a/org.argeo.slc.server/src/main/java/org/argeo/slc/ws/process/SlcExecutionStepsRequestEp.java +++ b/org.argeo.slc.server/src/main/java/org/argeo/slc/ws/process/SlcExecutionStepsRequestEp.java @@ -30,30 +30,22 @@ public class SlcExecutionStepsRequestEp extends try { SlcExecutionStepsRequest msg = (SlcExecutionStepsRequest) requestObject; uuid = msg.getSlcExecutionUuid(); - SlcExecution slcExecution = slcExecutionDao.getSlcExecution(uuid); - - if (slcExecution == null) - throw new SlcException("Could not find slc execution " + uuid); - - List additionalSteps = msg.getSteps(); if (log.isTraceEnabled()) { - log.trace("Trying to add additional steps to slc execution " + log.trace("Trying to add additional steps to SLC execution #" + uuid + ":"); - for (SlcExecutionStep step : additionalSteps) { - log.trace("Step " + step.getUuid() + " (in slc execution " + for (SlcExecutionStep step : msg.getSteps()) { + log.trace("Step " + step.getUuid() + " (in SLC execution #" + uuid + ")"); } } - slcExecution.getSteps().addAll(additionalSteps); log.debug("Adding " + msg.getSteps().size() - + " steps to SlcExecution with uuid " - + slcExecution.getUuid()); + + " steps to SLC execution #" + uuid); - slcExecutionDao.update(slcExecution); + slcExecutionDao.addSteps(uuid, msg.getSteps()); return null; } catch (Exception e) { - log.error("Could not update SlcExecution " + uuid + log.error("Could not update SLC execution #" + uuid + " with additional steps", e); throw e; }