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);
}
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();
}
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");
}
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>();
}
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();
}
Aggregations