protected KieSession initKieSession() throws CoreException { RuntimeEngine restSessionFactory; try { restSessionFactory = RemoteRuntimeEngineFactory.newRestBuilder() .addDeploymentId(bpmConfig.getDeploymentId()) .addUrl(new URL(bpmConfig.getBpmInstanceUrl())) .addUserName(bpmConfig.getUsername()) .addPassword(bpmConfig.getPassword()) .addTimeout(AUTHENTICATION_TIMEOUT_S) .build(); } catch (Exception e) { throw new CoreException("Could not initialize connection to BPM server at '" + bpmConfig.getBpmInstanceUrl() + "' check that the URL is correct.", e); } return restSessionFactory.getKieSession(); }
.addPassword("koek") .addUrl(new URL("http://localhost:8080/kie-wb")) .addTimeout(3) .addExtraJaxbClasses(MyType.class, Person.class) .buildFactory(); .addPassword("poffertje") .addUrl(new URL("http://localhost:8080/kie-wb")) .addTimeout(3) .buildFactory(); fail( "A user name should always be required!"); .addUserName("A") .addUrl(new URL("http://localhost:8080/kie-wb")) .addTimeout(3) .buildFactory(); fail( "A password should always be required!"); .addUserName("E") .addPassword("suiker") .addTimeout(3) .buildFactory(); fail( "A URL should always be required!");
.addPassword("koek") .addUrl(new URL("http://localhost:8080/kie-wb")) .addTimeout(3) .addExtraJaxbClasses(MyType.class, Person.class) .buildFactory(); .addPassword("poffertje") .addUrl(new URL("http://localhost:8080/kie-wb")) .addTimeout(3) .build(); fail( "A user name should always be required!"); .addUserName("A") .addUrl(new URL("http://localhost:8080/kie-wb")) .addTimeout(3) .build(); fail( "A password should always be required!"); .addUserName("E") .addPassword("suiker") .addTimeout(3) .build(); fail( "A URL should always be required!");