Search in sources :

Example 1 with ScriptNodeVariableType

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();
}
Also used : Repository(org.alfresco.repo.model.Repository) ScriptNodeVariableType(org.alfresco.repo.workflow.activiti.variable.ScriptNodeVariableType) Before(org.junit.Before)

Aggregations

Repository (org.alfresco.repo.model.Repository)1 ScriptNodeVariableType (org.alfresco.repo.workflow.activiti.variable.ScriptNodeVariableType)1 Before (org.junit.Before)1