use of org.alfresco.repo.workflow.activiti.variable.ScriptNodeVariableType in project alfresco-repository by Alfresco.
the class AbstractActivitiComponentTest method setUp.
@Before
public void setUp() throws Exception {
mockNamespaceService();
mockDictionaryService();
mockNodeService();
mockSearchService();
mockPermissionService();
mockPersonService();
mockAuthorityDAO();
mockServiceRegistry();
Repository repoHelper = mock(Repository.class);
when(repoHelper.getCompanyHome()).thenReturn(companyHomeNode);
workflowEngine.setRepositoryHelper(repoHelper);
// Also add custom type
// TODO: Should come from configuration
ScriptNodeVariableType variableType = new ScriptNodeVariableType();
variableType.setServiceRegistry(serviceRegistry);
// ((ProcessEngineImpl)processEngine).getProcessEngineConfiguration().getVariableTypes().addType(variableType, 1);
// Use util to set current user to admin
AuthenticationUtil.setFullyAuthenticatedUser("admin");
workflowEngine.afterPropertiesSet();
}
Aggregations