diff --git a/config/alfresco/bootstrap-context.xml b/config/alfresco/bootstrap-context.xml
index 6e8a3d37a7..e7fa2ec5ae 100644
--- a/config/alfresco/bootstrap-context.xml
+++ b/config/alfresco/bootstrap-context.xml
@@ -302,6 +302,7 @@
alfresco/workflow/wcm-workflow-messages
+
diff --git a/config/alfresco/extension/mt/mt-admin-context.xml.sample b/config/alfresco/extension/mt/mt-admin-context.xml.sample
index 41e5e34a90..c31ff643fc 100644
--- a/config/alfresco/extension/mt/mt-admin-context.xml.sample
+++ b/config/alfresco/extension/mt/mt-admin-context.xml.sample
@@ -24,10 +24,7 @@
-
-
-
-
+
diff --git a/config/alfresco/workflow-context.xml b/config/alfresco/workflow-context.xml
index 2a195a15da..5e4d964910 100644
--- a/config/alfresco/workflow-context.xml
+++ b/config/alfresco/workflow-context.xml
@@ -14,7 +14,10 @@
${server.transaction.allow-writes}
-
+
+
+
+
@@ -109,8 +112,8 @@
-
-
+
+
@@ -120,9 +123,8 @@
-
-
+
diff --git a/source/java/org/alfresco/repo/tenant/MultiTAdminServiceImpl.java b/source/java/org/alfresco/repo/tenant/MultiTAdminServiceImpl.java
index 506dd9dcda..77fa99a841 100755
--- a/source/java/org/alfresco/repo/tenant/MultiTAdminServiceImpl.java
+++ b/source/java/org/alfresco/repo/tenant/MultiTAdminServiceImpl.java
@@ -25,7 +25,6 @@
package org.alfresco.repo.tenant;
import java.io.File;
-import java.io.IOException;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.ArrayList;
@@ -46,30 +45,24 @@ import org.alfresco.repo.attributes.MapAttributeValue;
import org.alfresco.repo.attributes.StringAttributeValue;
import org.alfresco.repo.content.TenantRoutingFileContentStore;
import org.alfresco.repo.dictionary.DictionaryComponent;
-import org.alfresco.repo.dictionary.RepositoryLocation;
import org.alfresco.repo.importer.ImporterBootstrap;
import org.alfresco.repo.node.db.DbNodeServiceImpl;
import org.alfresco.repo.security.authentication.AuthenticationComponent;
import org.alfresco.repo.security.authentication.AuthenticationUtil;
import org.alfresco.repo.security.authentication.AuthenticationUtil.RunAsWork;
-import org.alfresco.repo.workflow.WorkflowDefinitionType;
import org.alfresco.repo.workflow.WorkflowDeployer;
import org.alfresco.service.cmr.admin.RepoAdminService;
import org.alfresco.service.cmr.attributes.AttributeService;
-import org.alfresco.service.cmr.repository.NodeRef;
import org.alfresco.service.cmr.repository.StoreRef;
-import org.alfresco.service.cmr.search.SearchService;
import org.alfresco.service.cmr.view.RepositoryExporterService;
import org.alfresco.service.cmr.workflow.WorkflowDefinition;
import org.alfresco.service.cmr.workflow.WorkflowService;
-import org.alfresco.service.namespace.NamespaceService;
import org.alfresco.service.transaction.TransactionService;
import org.alfresco.util.AbstractLifecycleBean;
import org.alfresco.util.ParameterCheck;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.context.ApplicationEvent;
-import org.springframework.core.io.ClassPathResource;
/**
* MT Admin Service Implementation.
@@ -93,10 +86,7 @@ public class MultiTAdminServiceImpl extends AbstractLifecycleBean implements Ten
private TenantRoutingFileContentStore tenantFileContentStore;
private WorkflowService workflowService;
private RepositoryExporterService repositoryExporterService;
- private NamespaceService namespaceService;
- private SearchService searchService;
- private RepositoryLocation repoWorkflowDefsLocation;
- private WorkflowDefinitionType workflowDefinitionType;
+ private WorkflowDeployer workflowDeployer;
protected final static String REGEX_VALID_TENANT_NAME = "^[a-zA-Z0-9]([a-zA-Z0-9]|.[a-zA-Z0-9])*$"; // note: must also be a valid filename
@@ -156,24 +146,9 @@ public class MultiTAdminServiceImpl extends AbstractLifecycleBean implements Ten
this.repositoryExporterService = repositoryExporterService;
}
- public void setNamespaceService(NamespaceService namespaceService)
+ public void setWorkflowDeployer(WorkflowDeployer workflowDeployer)
{
- this.namespaceService = namespaceService;
- }
-
- public void setSearchService(SearchService searchService)
- {
- this.searchService = searchService;
- }
-
- public void setRepositoryWorkflowDefsLocations(RepositoryLocation repoWorkflowDefsLocation)
- {
- this.repoWorkflowDefsLocation = repoWorkflowDefsLocation;
- }
-
- public void setWorkflowDefinitionType(WorkflowDefinitionType workflowDefinitionType)
- {
- this.workflowDefinitionType = workflowDefinitionType;
+ this.workflowDeployer = workflowDeployer;
}
@@ -192,9 +167,6 @@ public class MultiTAdminServiceImpl extends AbstractLifecycleBean implements Ten
private static final String TENANT_ROOT_CONTENT_STORE_DIR = "rootContentStoreDir";
private static final String ADMIN_BASENAME = TenantService.ADMIN_BASENAME;
-
- public final static String CRITERIA_ALL = "/*"; // immediate children only
- public final static String defaultSubtypeOfWorkflowDefinitionType = "subtypeOf('bpm:workflowDefinition')";
private List tenantDeployers = new ArrayList();
@@ -577,48 +549,18 @@ public class MultiTAdminServiceImpl extends AbstractLifecycleBean implements Ten
return new Tenant(tenantDomain, isEnabledTenant(tenantDomain), getRootContentStoreDir(tenantDomain));
}
- public void bootstrapWorkflows()
+ public void bootstrapWorkflows(String tenantDomain)
{
- // use this to deploy standard workflow process defs to the JBPM engine
- WorkflowDeployer workflowBootstrap = (WorkflowDeployer)getApplicationContext().getBean("workflowBootstrap");
-
- String resourceClasspath = null;
-
- // Workflow process definitions
- try
- {
- List workflowDefs = workflowBootstrap.getWorkflowDefinitions();
- if (workflowDefs != null)
- {
- for (Properties workflowDefProps : workflowDefs)
+ AuthenticationUtil.runAs(new RunAsWork