]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - runtime/org.argeo.slc.support.jcr/src/main/java/org/argeo/slc/jcr/execution/JcrExecutionModulesListener.java
Revert removal of execution flow paths
[gpl/argeo-slc.git] / runtime / org.argeo.slc.support.jcr / src / main / java / org / argeo / slc / jcr / execution / JcrExecutionModulesListener.java
index 541d366bf78b2b74fb27b3d422f77ccd4530a265..f63acb5c06faac9f5a21054014fccba7314816c0 100644 (file)
@@ -243,11 +243,6 @@ public class JcrExecutionModulesListener implements ExecutionModulesListener,
                        String relativePath, ExecutionFlowDescriptor efd)
                        throws RepositoryException {
                Node flowNode = null;
-               // if (relativePath.startsWith("/"))
-               // relativePath = relativePath.substring(1);
-               // if (relativePath.endsWith("/"))
-               // relativePath = relativePath.substring(0, relativePath.length() - 1);
-
                Iterator<String> names = Arrays.asList(relativePath.split("/"))
                                .iterator();
                // create intermediary paths
@@ -388,9 +383,12 @@ public class JcrExecutionModulesListener implements ExecutionModulesListener,
         * UTILITIES
         */
        /** @return the relative path, never starts with '/' */
+       @SuppressWarnings("deprecation")
        protected String getExecutionFlowRelativePath(
                        ExecutionFlowDescriptor executionFlow) {
-               String relativePath = executionFlow.getName();
+               String relativePath = executionFlow.getPath() == null ? executionFlow
+                               .getName() : executionFlow.getPath() + '/'
+                               + executionFlow.getName();
                // we assume that it is more than one char long
                if (relativePath.charAt(0) == '/')
                        relativePath = relativePath.substring(1);