Search in sources :

Example 21 with JBossUserGroupCallbackImpl

use of org.jbpm.services.task.identity.JBossUserGroupCallbackImpl in project jbpm by kiegroup.

the class ProcessKModuleMain method createRuntimeManager.

private static RuntimeManager createRuntimeManager() {
    cleanupSingletonSessionId();
    JBPMHelper.startH2Server();
    JBPMHelper.setupDataSource();
    EntityManagerFactory emf = Persistence.createEntityManagerFactory("org.jbpm.persistence.jpa");
    RuntimeEnvironmentBuilder builder = RuntimeEnvironmentBuilder.Factory.get().newClasspathKmoduleDefaultBuilder().entityManagerFactory(emf).userGroupCallback(new JBossUserGroupCallbackImpl("classpath:/usergroups.properties"));
    return RuntimeManagerFactory.Factory.get().newSingletonRuntimeManager(builder.get(), "com.sample:example:1.0");
}
Also used : JBossUserGroupCallbackImpl(org.jbpm.services.task.identity.JBossUserGroupCallbackImpl) EntityManagerFactory(javax.persistence.EntityManagerFactory) RuntimeEnvironmentBuilder(org.kie.api.runtime.manager.RuntimeEnvironmentBuilder)

Example 22 with JBossUserGroupCallbackImpl

use of org.jbpm.services.task.identity.JBossUserGroupCallbackImpl in project jbpm by kiegroup.

the class LocalTaskServiceTest method init.

@Before
public void init() throws Exception {
    createRuntimeManager(HUMAN_TASK, EVALUATION, TASK_MULTIPLE_ACTORS, TASK_SINGLE_TYPE);
    RuntimeEngine re = getRuntimeEngine();
    kieSession = re.getKieSession();
    taskService = LocalHTWorkItemHandlerUtil.registerLocalHTWorkItemHandler(kieSession, getEmf(), new JBossUserGroupCallbackImpl(USER_GROUP_RES));
}
Also used : RuntimeEngine(org.kie.api.runtime.manager.RuntimeEngine) JBossUserGroupCallbackImpl(org.jbpm.services.task.identity.JBossUserGroupCallbackImpl) Before(org.junit.Before)

Example 23 with JBossUserGroupCallbackImpl

use of org.jbpm.services.task.identity.JBossUserGroupCallbackImpl in project jbpm by kiegroup.

the class EjbTimerServiceIntegrationTest method setup.

@Before
public void setup() {
    Properties properties = new Properties();
    properties.setProperty("mary", "HR");
    properties.setProperty("john", "HR");
    properties.setProperty("krisv", "HR");
    userGroupCallback = new JBossUserGroupCallbackImpl(properties);
}
Also used : JBossUserGroupCallbackImpl(org.jbpm.services.task.identity.JBossUserGroupCallbackImpl) Properties(java.util.Properties) Before(org.junit.Before)

Example 24 with JBossUserGroupCallbackImpl

use of org.jbpm.services.task.identity.JBossUserGroupCallbackImpl in project jbpm by kiegroup.

the class CDITestHelper method getUserGroupCallback.

@Produces
public UserGroupCallback getUserGroupCallback() {
    Properties properties = new Properties();
    properties.setProperty("mary", "HR");
    properties.setProperty("john", "HR,Accounting");
    properties.setProperty("salaboy", "HR,IT,Accounting");
    properties.setProperty("katy", "HR,IT,Accounting,admins");
    return new JBossUserGroupCallbackImpl(properties);
}
Also used : JBossUserGroupCallbackImpl(org.jbpm.services.task.identity.JBossUserGroupCallbackImpl) Properties(java.util.Properties) Produces(javax.enterprise.inject.Produces)

Example 25 with JBossUserGroupCallbackImpl

use of org.jbpm.services.task.identity.JBossUserGroupCallbackImpl in project jbpm by kiegroup.

the class AsyncContinuationSupportTest method setup.

@Before
public void setup() {
    ExecutorTestUtil.cleanupSingletonSessionId();
    pds = ExecutorTestUtil.setupPoolingDataSource();
    Properties properties = new Properties();
    properties.setProperty("mary", "HR");
    properties.setProperty("john", "HR");
    userGroupCallback = new JBossUserGroupCallbackImpl(properties);
    executorService = buildExecutorService();
}
Also used : JBossUserGroupCallbackImpl(org.jbpm.services.task.identity.JBossUserGroupCallbackImpl) Properties(java.util.Properties) Before(org.junit.Before)

Aggregations

JBossUserGroupCallbackImpl (org.jbpm.services.task.identity.JBossUserGroupCallbackImpl)41 Properties (java.util.Properties)38 Before (org.junit.Before)29 HashMap (java.util.HashMap)8 UserGroupCallback (org.kie.api.task.UserGroupCallback)8 Test (org.junit.Test)7 RuntimeEngine (org.kie.api.runtime.manager.RuntimeEngine)7 ArrayList (java.util.ArrayList)6 KieSession (org.kie.api.runtime.KieSession)6 ProcessInstance (org.kie.api.runtime.process.ProcessInstance)6 WorkflowProcessInstance (org.jbpm.workflow.instance.WorkflowProcessInstance)5 NodeLeftCountDownProcessEventListener (org.jbpm.test.listener.NodeLeftCountDownProcessEventListener)4 DefaultProcessEventListener (org.kie.api.event.process.DefaultProcessEventListener)4 ProcessEventListener (org.kie.api.event.process.ProcessEventListener)4 ProcessNodeLeftEvent (org.kie.api.event.process.ProcessNodeLeftEvent)4 RuntimeEnvironment (org.kie.api.runtime.manager.RuntimeEnvironment)4 Status (org.kie.api.task.model.Status)4 TaskSummary (org.kie.api.task.model.TaskSummary)4 UserTransaction (javax.transaction.UserTransaction)3 SessionNotFoundException (org.kie.internal.runtime.manager.SessionNotFoundException)3