]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - eclipse/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/editors/ProcessEditor.java
Improve UI
[gpl/argeo-slc.git] / eclipse / plugins / org.argeo.slc.client.ui / src / main / java / org / argeo / slc / client / ui / editors / ProcessEditor.java
index 57b896272f97d196ceac6ba58795a61f48d62e4a..a355ff7d952d3b46413e6dd09362d6fb39f98da2 100644 (file)
@@ -10,7 +10,7 @@ import javax.jcr.NodeIterator;
 import javax.jcr.RepositoryException;
 import javax.jcr.Session;
 
-import org.argeo.eclipse.ui.Error;
+import org.argeo.eclipse.ui.ErrorFeedback;
 import org.argeo.jcr.JcrUtils;
 import org.argeo.slc.SlcException;
 import org.argeo.slc.client.ui.ClientUiPlugin;
@@ -110,7 +110,7 @@ public class ProcessEditor extends FormEditor implements
                doSave(null);
                try {
                        // show log
-                       // setActivePage(logPage.getId());
+                       setActivePage(logPage.getId());
 
                        ExecutionProcess process = processController.process(processNode);
                        Map<String, String> properties = new HashMap<String, String>();
@@ -118,7 +118,7 @@ public class ProcessEditor extends FormEditor implements
                                        process.getUuid());
                        modulesManager.registerProcessNotifier(this, properties);
                } catch (Exception e) {
-                       Error.show("Execution of " + processNode + " failed", e);
+                       ErrorFeedback.show("Execution of " + processNode + " failed", e);
                }
        }
 
@@ -150,14 +150,14 @@ public class ProcessEditor extends FormEditor implements
                        Node newNode = JcrUtils.mkdirs(session, destPath,
                                        SlcTypes.SLC_PROCESS);
 
+                       Node rootRealizedFlowNode = newNode.addNode(SLC_FLOW);
                        // copy node
-                       JcrUtils.copy(processNode, newNode);
+                       JcrUtils.copy(processNode.getNode(SLC_FLOW), rootRealizedFlowNode);
 
                        newNode.setProperty(SLC_UUID, uuid);
                        newNode.setProperty(SLC_STATUS, ExecutionProcess.INITIALIZED);
 
                        // reset realized flow status
-                       Node rootRealizedFlowNode = newNode.getNode(SLC_FLOW);
                        // we just manage one level for the time being
                        NodeIterator nit = rootRealizedFlowNode.getNodes(SLC_FLOW);
                        while (nit.hasNext()) {
@@ -178,7 +178,7 @@ public class ProcessEditor extends FormEditor implements
                        builderPage = new ProcessBuilderPage(this, processNode);
                        addPage(builderPage);
                        firePropertyChange(PROP_DIRTY);
-                       logPage = new ProcessLogPage(this);
+                       logPage = new ProcessLogPage(this, processNode);
                        addPage(logPage);
                } catch (PartInitException e) {
                        throw new SlcException("Cannot add pages", e);
@@ -217,7 +217,7 @@ public class ProcessEditor extends FormEditor implements
        }
 
        public void addSteps(ExecutionProcess process, List<ExecutionStep> steps) {
-               logPage.addSteps(steps);
+               // logPage.addSteps(steps);
        }
 
        /** Expects one session per editor. */