Package org.jbpm.services.task

Examples of org.jbpm.services.task.HumanTaskConfigurator


    // listeners to be registered
    private List<TaskLifeCycleEventListener> listeners;
    @Override
    public Object getObject() throws Exception {
        if (instance == null) {
            HumanTaskConfigurator configurator = HumanTaskServiceFactory.newTaskServiceConfigurator();
            configurator
            .entityManagerFactory(entityManagerFactory)
            .userGroupCallback(userGroupCallback)
            .userInfo(userInfo);

            if (listeners != null) {
                for(TaskLifeCycleEventListener listener : listeners) {
                    configurator.listener(listener);
                }
            }
            Environment environment = EnvironmentFactory.newEnvironment();
            environment.set(EnvironmentName.TRANSACTION_MANAGER, transactionManager);
            environment.set(EnvironmentName.ENTITY_MANAGER_FACTORY, entityManagerFactory);
            if (entityManager != null) {
                environment.set(EnvironmentName.APP_SCOPED_ENTITY_MANAGER, entityManager);
                environment.set(EnvironmentName.CMD_SCOPED_ENTITY_MANAGER, entityManager);
                environment.set("IS_JTA_TRANSACTION", false);
                environment.set("IS_SHARED_ENTITY_MANAGER", true);
            }
            configurator.environment(environment);

            instance = configurator.getTaskService();
        }

        return instance;
    }
View Full Code Here

TOP

Related Classes of org.jbpm.services.task.HumanTaskConfigurator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.