package org.argeo.slc.web.mvc.process;\r
\r
import java.io.BufferedReader;\r
+import java.util.UUID;\r
\r
import javax.servlet.http.HttpServletRequest;\r
import javax.servlet.http.HttpServletResponse;\r
import org.apache.commons.logging.LogFactory;\r
import org.argeo.slc.msg.MsgConstants;\r
import org.argeo.slc.process.SlcExecution;\r
+import org.argeo.slc.process.SlcExecutionStep;\r
import org.argeo.slc.runtime.SlcAgent;\r
import org.argeo.slc.runtime.SlcAgentFactory;\r
-import org.argeo.slc.services.process.SlcExecutionService;\r
+import org.argeo.slc.services.SlcExecutionService;\r
import org.argeo.slc.web.mvc.AbstractServiceController;\r
import org.springframework.oxm.Unmarshaller;\r
import org.springframework.util.Assert;\r
SlcExecution slcExecution = (SlcExecution) unmarshaller\r
.unmarshal(source);\r
\r
+ // Workaround for https://www.argeo.org/bugzilla/show_bug.cgi?id=86\r
+ if (slcExecution.getUuid() == null\r
+ || slcExecution.getUuid().length() < 8)\r
+ slcExecution.setUuid(UUID.randomUUID().toString());\r
+\r
slcExecution.setStatus(SlcExecution.STATUS_SCHEDULED);\r
+ slcExecution.getSteps().add(\r
+ new SlcExecutionStep(SlcExecutionStep.TYPE_START,\r
+ "Process started from the Web UI"));\r
slcExecutionService.newExecution(slcExecution);\r
\r
SlcAgent agent = agentFactory.getAgent(agentId);\r