public static UserGroupCallback getUserGroupCallback() { UserGroupCallback callback = new MvelUserGroupCallbackImpl(true); if ("ldap".equalsIgnoreCase(USER_CALLBACK_IMPL)) { callback = new LDAPUserGroupCallbackImpl(true); } else if ("db".equalsIgnoreCase(USER_CALLBACK_IMPL)) { callback = new DBUserGroupCallbackImpl(true); } else if ("mvel".equalsIgnoreCase(USER_CALLBACK_IMPL)) { callback = new MvelUserGroupCallbackImpl(true); } else if ("props".equalsIgnoreCase(USER_CALLBACK_IMPL)) { callback = new JBossUserGroupCallbackImpl(true); } else if ("jaas".equalsIgnoreCase(USER_CALLBACK_IMPL)) { callback = new JAASUserGroupCallbackImpl(true); } else if ("custom".equalsIgnoreCase(USER_CALLBACK_IMPL)) { try { callback = (UserGroupCallback) Class.forName(CUSTOM_USER_CALLBACK_IMPL).newInstance(); } catch (Exception e) { throw new RuntimeException("Unable to create instance of custom user group callback impl", e); } } return callback; }
@Before public void setup() { Properties properties= new Properties(); properties.setProperty("mary", "HR"); properties.setProperty("john", "HR"); userGroupCallback = new JBossUserGroupCallbackImpl(properties); pds = TestUtil.setupPoolingDataSource(); }
@Before public void setup() { TestUtil.cleanupSingletonSessionId(); Properties properties= new Properties(); properties.setProperty("mary", "HR"); properties.setProperty("john", "HR"); userGroupCallback = new JBossUserGroupCallbackImpl(properties); }
@Before public void setup() { pds = TestUtil.setupPoolingDataSource(); Properties properties= new Properties(); properties.setProperty("mary", "HR"); properties.setProperty("john", "HR"); userGroupCallback = new JBossUserGroupCallbackImpl(properties); }
@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>(); }
@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); }
@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); }
@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); }
@Before public void setup() throws NamingException { TestUtil.cleanupSingletonSessionId(); Properties properties= new Properties(); properties.setProperty("mary", "HR"); properties.setProperty("john", "HR"); userGroupCallback = new JBossUserGroupCallbackImpl(properties); createRuntimeManager(); }
@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); }
@Before public void setup() { Properties properties= new Properties(); properties.setProperty("mary", "HR"); properties.setProperty("john", "HR"); userGroupCallback = new JBossUserGroupCallbackImpl(properties); pds = TestUtil.setupPoolingDataSource(); emf = EntityManagerFactoryManager.get().getOrCreate("org.jbpm.persistence.jpa"); }
@Before public void setup() { Properties properties= new Properties(); properties.setProperty("mary", "HR"); properties.setProperty("john", "HR"); userGroupCallback = new JBossUserGroupCallbackImpl(properties); pds = TestUtil.setupPoolingDataSource(); emf = EntityManagerFactoryManager.get().getOrCreate("org.jbpm.persistence.jpa"); }
@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); }
@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); }
@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); }
@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); }
@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); auditService = new JPAAuditLogService(emf); }
@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); auditService = new JPAAuditLogService(emf); }
@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(); }
@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"); }