X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=runtime%2Forg.argeo.slc.server%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fslc%2Fservices%2Fimpl%2FSlcExecutionServiceImpl.java;h=56ad0ac2180c2267afae4c2857b364f129d52544;hb=abc0180c68f7a53cddd066b0f88bc8213d2ae04a;hp=6efb37ae655a15ce5d64ce0db6ba6113dff1a6be;hpb=1d1bc92e4aef2b8b889d7482f91b7ed905f0fb47;p=gpl%2Fargeo-slc.git diff --git a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/impl/SlcExecutionServiceImpl.java b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/impl/SlcExecutionServiceImpl.java index 6efb37ae6..56ad0ac21 100644 --- a/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/impl/SlcExecutionServiceImpl.java +++ b/runtime/org.argeo.slc.server/src/main/java/org/argeo/slc/services/impl/SlcExecutionServiceImpl.java @@ -1,5 +1,24 @@ +/* + * Copyright (C) 2010 Mathieu Baudier + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + package org.argeo.slc.services.impl; +import java.util.ArrayList; +import java.util.List; + import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.argeo.slc.SlcException; @@ -49,10 +68,12 @@ public class SlcExecutionServiceImpl implements SlcExecutionService { slcExecution.setStatus(msg.getNewStatus()); - if (msg.getNewStatus().equals(SlcExecution.STATUS_FINISHED)) - slcExecution.getSteps().add( - new SlcExecutionStep(SlcExecutionStep.TYPE_END, - "Process finished.")); + if (msg.getNewStatus().equals(SlcExecution.STATUS_FINISHED)) { + List steps = new ArrayList(); + steps.add(new SlcExecutionStep(SlcExecutionStep.END, + "Process finished.")); + slcExecutionDao.addSteps(slcExecution.getUuid(), steps); + } if (log.isTraceEnabled()) log.trace("Updating status for SLC execution #"