Search in sources :

Example 6 with JBossUserGroupCallbackImpl

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

the class PerRequestRuntimeManagerTest method setup.

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

Example 7 with JBossUserGroupCallbackImpl

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

the class PersistenceRuntimeManagerTest method setup.

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

Example 8 with JBossUserGroupCallbackImpl

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

the class MvelResolverDeploymentDescriptorManagerTest method testDeploymentDescriptorFromKieContainer.

@Test
public void testDeploymentDescriptorFromKieContainer() throws IOException {
    Map<String, String> resources = new HashMap<String, String>();
    KieServices ks = KieServices.Factory.get();
    ReleaseId releaseId = ks.newReleaseId(GROUP_ID, ARTIFACT_ID, VERSION);
    String kmoduleString = IOUtils.toString(this.getClass().getResourceAsStream("/kmodule-custom-wih.xml"), "UTF-8");
    resources.put("src/main/resources/META-INF/kmodule.xml", kmoduleString);
    String processString = IOUtils.toString(this.getClass().getResourceAsStream("/BPMN2-CustomTask.bpmn2"), "UTF-8");
    resources.put("src/main/resources/BPMN2-CustomTask.bpmn2", processString);
    InternalKieModule kJar1 = createKieJar(ks, releaseId, resources);
    installKjar(releaseId, kJar1);
    Properties properties = new Properties();
    UserGroupCallback userGroupCallback = new JBossUserGroupCallbackImpl(properties);
    RuntimeEnvironment environment = RuntimeEnvironmentBuilder.Factory.get().newDefaultBuilder(releaseId).userGroupCallback(userGroupCallback).get();
    manager = RuntimeManagerFactory.Factory.get().newPerProcessInstanceRuntimeManager(environment);
    manager.getRuntimeEngine(ProcessInstanceIdContext.get()).getKieSession().startProcess("customtask");
}
Also used : RuntimeEnvironment(org.kie.api.runtime.manager.RuntimeEnvironment) HashMap(java.util.HashMap) JBossUserGroupCallbackImpl(org.jbpm.services.task.identity.JBossUserGroupCallbackImpl) KieServices(org.kie.api.KieServices) ReleaseId(org.kie.api.builder.ReleaseId) Properties(java.util.Properties) UserGroupCallback(org.kie.api.task.UserGroupCallback) InternalKieModule(org.drools.compiler.kie.builder.impl.InternalKieModule) Test(org.junit.Test)

Example 9 with JBossUserGroupCallbackImpl

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

the class RuntimeManagerWithDescriptorTest method setup.

@Before
public void setup() {
    TestUtil.cleanupSingletonSessionId();
    pds = TestUtil.setupPoolingDataSource();
    Properties properties = new Properties();
    properties.setProperty("mary", "HR");
    properties.setProperty("john", "HR");
    userGroupCallback = new JBossUserGroupCallbackImpl(properties);
    taskEvents = new ArrayList<String>();
    processEvents = new ArrayList<String>();
}
Also used : JBossUserGroupCallbackImpl(org.jbpm.services.task.identity.JBossUserGroupCallbackImpl) Properties(java.util.Properties) Before(org.junit.Before)

Example 10 with JBossUserGroupCallbackImpl

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

the class ExecutionErrorHandlingRuntimeManagerTest method setup.

@Before
public void setup() {
    TestUtil.cleanupSingletonSessionId();
    pds = TestUtil.setupPoolingDataSource();
    emf = EntityManagerFactoryManager.get().getOrCreate("org.jbpm.persistence.jpa");
    Properties properties = new Properties();
    properties.setProperty("mary", "HR");
    properties.setProperty("john", "HR");
    userGroupCallback = new JBossUserGroupCallbackImpl(properties);
    createRuntimeManager();
}
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