Search in sources :

Example 1 with BPMNOSGIServiceException

use of org.wso2.carbon.bpmn.rest.common.exception.BPMNOSGIServiceException in project carbon-business-process by wso2.

the class BPMNOSGIService method getGroupIdentityManager.

public static BPSGroupIdentityManager getGroupIdentityManager() {
    ProcessEngineImpl processEngine = (ProcessEngineImpl) getBPMNEngineService().getProcessEngine();
    ProcessEngineConfigurationImpl processEngineConfigurationImpl = null;
    if (processEngine != null) {
        processEngineConfigurationImpl = processEngine.getProcessEngineConfiguration();
        if (processEngineConfigurationImpl != null) {
            BPSGroupIdentityManager bpsGroupIdentityManager = null;
            if (processEngineConfigurationImpl.getSessionFactories() != null) {
                BPSGroupManagerFactory bpsGroupManagerFactory = (BPSGroupManagerFactory) processEngineConfigurationImpl.getSessionFactories().get(GroupIdentityManager.class);
                return (BPSGroupIdentityManager) bpsGroupManagerFactory.openSession();
            }
        }
    }
    throw new BPMNOSGIServiceException("Business Process Server Group manager couldn't be identified");
}
Also used : BPSGroupManagerFactory(org.wso2.carbon.bpmn.core.integration.BPSGroupManagerFactory) BPMNOSGIServiceException(org.wso2.carbon.bpmn.rest.common.exception.BPMNOSGIServiceException) GroupIdentityManager(org.activiti.engine.impl.persistence.entity.GroupIdentityManager) BPSGroupIdentityManager(org.wso2.carbon.bpmn.core.integration.BPSGroupIdentityManager) BPSGroupIdentityManager(org.wso2.carbon.bpmn.core.integration.BPSGroupIdentityManager) ProcessEngineConfigurationImpl(org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl) ProcessEngineImpl(org.activiti.engine.impl.ProcessEngineImpl)

Aggregations

ProcessEngineImpl (org.activiti.engine.impl.ProcessEngineImpl)1 ProcessEngineConfigurationImpl (org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl)1 GroupIdentityManager (org.activiti.engine.impl.persistence.entity.GroupIdentityManager)1 BPSGroupIdentityManager (org.wso2.carbon.bpmn.core.integration.BPSGroupIdentityManager)1 BPSGroupManagerFactory (org.wso2.carbon.bpmn.core.integration.BPSGroupManagerFactory)1 BPMNOSGIServiceException (org.wso2.carbon.bpmn.rest.common.exception.BPMNOSGIServiceException)1