Search in sources :

Example 1 with DefaultWorkflowPropertyHandler

use of org.alfresco.repo.workflow.DefaultWorkflowPropertyHandler in project alfresco-remote-api by Alfresco.

the class ProcessesImpl method getDefaultPropertyHandler.

protected DefaultWorkflowPropertyHandler getDefaultPropertyHandler() {
    if (defaultPropertyHandler == null) {
        defaultPropertyHandler = new DefaultWorkflowPropertyHandler();
        defaultPropertyHandler.setMessageService(messageService);
        defaultPropertyHandler.setNodeConverter(getNodeConverter());
    }
    return defaultPropertyHandler;
}
Also used : DefaultWorkflowPropertyHandler(org.alfresco.repo.workflow.DefaultWorkflowPropertyHandler)

Example 2 with DefaultWorkflowPropertyHandler

use of org.alfresco.repo.workflow.DefaultWorkflowPropertyHandler in project alfresco-repository by Alfresco.

the class ActivitiWorkflowManagerFactory method getObject.

/**
 * {@inheritDoc}
 */
@Override
public ActivitiWorkflowManager getObject() throws Exception {
    if (messageService == null) {
        throw new WorkflowException("MessageService not specified");
    }
    if (serviceRegistry == null) {
        throw new WorkflowException("ServiceRegistry not specified");
    }
    if (tenantService == null) {
        throw new WorkflowException("TenantService not specified");
    }
    ActivitiNodeConverter nodeConverter = new ActivitiNodeConverter(serviceRegistry);
    DefaultWorkflowPropertyHandler defaultPropertyHandler = new DefaultWorkflowPropertyHandler();
    defaultPropertyHandler.setMessageService(messageService);
    defaultPropertyHandler.setNodeConverter(nodeConverter);
    WorkflowQNameConverter qNameConverter = new WorkflowQNameConverter(namespaceService);
    WorkflowPropertyHandlerRegistry handlerRegistry = new WorkflowPropertyHandlerRegistry(defaultPropertyHandler, qNameConverter);
    WorkflowAuthorityManager authorityManager = new WorkflowAuthorityManager(authorityDAO);
    QName defaultStartTaskType = WorkflowModel.TYPE_ACTIVTI_START_TASK;
    WorkflowObjectFactory factory = new WorkflowObjectFactory(qNameConverter, tenantService, messageService, dictionaryService, engineId, defaultStartTaskType);
    ActivitiUtil activitiUtil = new ActivitiUtil(processEngine, deployWorkflowsInTenant, retentionHistoricProcessInstance);
    ActivitiPropertyConverter propertyConverter = new ActivitiPropertyConverter(activitiUtil, factory, handlerRegistry, authorityManager, messageService, nodeConverter);
    ActivitiTypeConverter typeConverter = new ActivitiTypeConverter(processEngine, factory, propertyConverter, deployWorkflowsInTenant);
    ActivitiWorkflowEngine workflowEngine = new ActivitiWorkflowEngine();
    workflowEngine.setActivitiUtil(activitiUtil);
    workflowEngine.setAuthorityManager(authorityManager);
    workflowEngine.setBPMEngineRegistry(bpmEngineRegistry);
    workflowEngine.setEngineId(engineId);
    workflowEngine.setFactory(factory);
    workflowEngine.setMessageService(messageService);
    workflowEngine.setNamespaceService(namespaceService);
    workflowEngine.setNodeConverter(nodeConverter);
    workflowEngine.setDictionaryService(dictionaryService);
    workflowEngine.setNodeService(nodeService);
    workflowEngine.setPersonService(personService);
    workflowEngine.setPropertyConverter(propertyConverter);
    workflowEngine.setTenantService(tenantService);
    workflowEngine.setTypeConverter(typeConverter);
    workflowEngine.setRepositoryHelper(repositoryHelper);
    return new ActivitiWorkflowManager(workflowEngine, propertyConverter, handlerRegistry, nodeConverter, authorityManager);
}
Also used : QName(org.alfresco.service.namespace.QName) WorkflowException(org.alfresco.service.cmr.workflow.WorkflowException) WorkflowQNameConverter(org.alfresco.repo.workflow.WorkflowQNameConverter) WorkflowAuthorityManager(org.alfresco.repo.workflow.WorkflowAuthorityManager) WorkflowPropertyHandlerRegistry(org.alfresco.repo.workflow.WorkflowPropertyHandlerRegistry) ActivitiPropertyConverter(org.alfresco.repo.workflow.activiti.properties.ActivitiPropertyConverter) DefaultWorkflowPropertyHandler(org.alfresco.repo.workflow.DefaultWorkflowPropertyHandler) WorkflowObjectFactory(org.alfresco.repo.workflow.WorkflowObjectFactory)

Aggregations

DefaultWorkflowPropertyHandler (org.alfresco.repo.workflow.DefaultWorkflowPropertyHandler)2 WorkflowAuthorityManager (org.alfresco.repo.workflow.WorkflowAuthorityManager)1 WorkflowObjectFactory (org.alfresco.repo.workflow.WorkflowObjectFactory)1 WorkflowPropertyHandlerRegistry (org.alfresco.repo.workflow.WorkflowPropertyHandlerRegistry)1 WorkflowQNameConverter (org.alfresco.repo.workflow.WorkflowQNameConverter)1 ActivitiPropertyConverter (org.alfresco.repo.workflow.activiti.properties.ActivitiPropertyConverter)1 WorkflowException (org.alfresco.service.cmr.workflow.WorkflowException)1 QName (org.alfresco.service.namespace.QName)1