X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;ds=sidebyside;f=plugins%2Forg.argeo.slc.client.ui%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fslc%2Fclient%2Fui%2Feditors%2FProcessEditor.java;fp=plugins%2Forg.argeo.slc.client.ui%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fslc%2Fclient%2Fui%2Feditors%2FProcessEditor.java;h=87b7f86940db8f72a35d06f81cbf1f1f5848d08d;hb=cec804823540f035172eabce620e636ea4f5e80d;hp=71ca6b88d43416442a618a815652841018ebf8d9;hpb=86420d80b15dced00fbf542d11583647c9085642;p=gpl%2Fargeo-slc.git diff --git a/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/editors/ProcessEditor.java b/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/editors/ProcessEditor.java index 71ca6b88d..87b7f8694 100644 --- a/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/editors/ProcessEditor.java +++ b/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/editors/ProcessEditor.java @@ -22,6 +22,7 @@ import java.util.UUID; import javax.jcr.Node; import javax.jcr.NodeIterator; +import javax.jcr.Property; import javax.jcr.RepositoryException; import javax.jcr.Session; @@ -122,8 +123,32 @@ public class ProcessEditor extends FormEditor implements } catch (RepositoryException e) { throw new SlcException("Cannot update status of " + processNode, e); } + + // save doSave(null); + try { + // make sure modules are started for all nodes + for (NodeIterator nit = processNode.getNode(SLC_FLOW).getNodes(); nit + .hasNext();) { + Node flowNode = nit.nextNode(); + try { + String flowDefPath = flowNode.getNode(SLC_ADDRESS) + .getProperty(Property.JCR_PATH).getString(); + Node executionModuleNode = flowNode.getSession().getNode( + SlcJcrUtils.modulePath(flowDefPath)); + if (!executionModuleNode.getProperty(SLC_STARTED) + .getBoolean()) + ClientUiPlugin.startStopExecutionModule(modulesManager, + executionModuleNode); + } catch (Exception e) { + ErrorFeedback.show( + "Cannot start execution module related to " + + flowNode, e); + } + } + + // Actually process ExecutionProcess process = processController.process(processNode); Map properties = new HashMap(); properties.put(ExecutionModulesManager.SLC_PROCESS_ID,