public RemoteRuntimeEngine newRuntimeEngine() { return new RemoteRuntimeEngine(config); }
KieSession ksession = engine.getKieSession(); TaskService taskService = engine.getTaskService(); taskService = engine.getTaskService(); List<TaskSummary> tasks = taskService.getTasksAssignedAsPotentialOwner(user, "en-UK");
RemoteRuntimeEngine engine = restSessionFactory.newRuntimeEngine(); KieSession ksession = engine.getKieSession(); TaskService taskService = engine.getTaskService(); AuditLogService auditLogService = engine.getAuditLogService();
runtimeEngine.getTaskService().claim(23l, "user"); } catch( RemoteCommunicationException rce ) { runtimeEngine.getAuditService().clear(); fail( "This should have failed because there's no server running... "); } catch( RemoteCommunicationException rce ) { runtimeEngine.getKieSession().startProcess("org.test.process"); fail( "This should have failed because no deployment id has been provided. "); } catch( MissingRequiredInfoException mrie ) { runtimeEngine.getTaskService().claim(23l, "user"); fail( "This should have failed because there's no server running... "); } catch( RemoteCommunicationException rce ) { runtimeEngine.getAuditService().clear(); fail( "This should have failed because there's no server running... "); } catch( RemoteCommunicationException rce ) { runtimeEngine.getKieSession().startProcess("org.test.process"); } catch( MissingRequiredInfoException mrie ) {
@Test public void notAceptedMethodTest() throws Exception { URL deploymentUrl = new URL( "http://localhost:8080/kie-wb/" ); RemoteRestRuntimeEngineFactory restSessionFactory = RemoteRuntimeEngineFactory.newRestBuilder() .addDeploymentId("deployment") .addUrl(deploymentUrl) .addUserName("mary") .addPassword("pass") .buildFactory(); WorkItemHandler wih = new DoNothingWorkItemHandler(); try { restSessionFactory.newRuntimeEngine().getKieSession().getWorkItemManager().registerWorkItemHandler("test", wih); fail( "The above call should have failed."); } catch( UnsupportedOperationException uoe ) { assertTrue("Incorrect error message: " + uoe.getMessage(), uoe.getMessage().contains("not supported on the Remote Client instance.")); } }
KieSession ksession = engine.getKieSession(); TaskService taskService = engine.getTaskService(); taskService = engine.getTaskService(); List<TaskSummary> tasks = taskService.getTasksAssignedAsPotentialOwner(user, "en-UK");
runtimeEngine.getTaskService().claim(23l, "user"); } catch( RemoteCommunicationException rce ) { runtimeEngine.getAuditLogService().clear(); fail( "This should have failed because there's no server running... "); } catch( RemoteCommunicationException rce ) { runtimeEngine.getKieSession().startProcess("org.test.process"); fail( "This should have failed because no deployment id has been provided. "); } catch( MissingRequiredInfoException mrie ) { runtimeEngine.getTaskService().claim(23l, "user"); fail( "This should have failed because there's no server running... "); } catch( RemoteCommunicationException rce ) { runtimeEngine.getAuditLogService().clear(); fail( "This should have failed because there's no server running... "); } catch( RemoteCommunicationException rce ) { runtimeEngine.getKieSession().startProcess("org.test.process"); } catch( MissingRequiredInfoException mrie ) {
@Test public void notAceptedMethodTest() throws Exception { URL deploymentUrl = new URL( "http://localhost:8080/kie-wb/" ); RemoteRestRuntimeEngineFactory restSessionFactory = RemoteRestRuntimeEngineFactory.newBuilder() .addDeploymentId("deployment") .addUrl(deploymentUrl) .addUserName("mary") .addPassword("pass") .build(); WorkItemHandler wih = new DoNothingWorkItemHandler(); try { restSessionFactory.newRuntimeEngine().getKieSession().getWorkItemManager().registerWorkItemHandler("test", wih); fail( "The above call should have failed."); } catch( UnsupportedOperationException uoe ) { assertEquals("The .registerWorkItemHandler(..) method is not supported on the remote api.", uoe.getMessage()); } }
.buildFactory(); jmsRuntimeFactory.newRuntimeEngine().getKieSession(); fail( "A ksession queue is required for a ksession!"); } catch( MissingRequiredInfoException e) { .buildFactory(); jmsRuntimeFactory.newRuntimeEngine().getTaskService(); fail( "A task service queue is always required!"); } catch( MissingRequiredInfoException e) {
public RemoteRuntimeEngine newRuntimeEngine() { return new RemoteRuntimeEngine(config); }
.build(); jmsRuntimeFactory.newRuntimeEngine().getKieSession(); fail( "A ksession queue is required for a ksession!"); } catch( MissingRequiredInfoException e) { .build(); jmsRuntimeFactory.newRuntimeEngine().getTaskService(); fail( "A task service queue is always required!"); } catch( MissingRequiredInfoException e) {
public RemoteRuntimeEngine newRuntimeEngine() { return new RemoteRuntimeEngine(config); }
.buildFactory(); jmsRuntimeFactory.newRuntimeEngine().getKieSession(); fail( "A ksession queue is required for a ksession!"); } catch( MissingRequiredInfoException e) { .buildFactory(); jmsRuntimeFactory.newRuntimeEngine().getTaskService(); fail( "A task service queue is always required!"); } catch( MissingRequiredInfoException e) {
public RemoteRuntimeEngine newRuntimeEngine() { return new RemoteRuntimeEngine(config); }
@Override public RemoteRuntimeEngine build() { checkAndFinalizeConfig(); return new RemoteRuntimeEngine(config.clone()); }
@Override public RemoteRuntimeEngine build() { checkAndFinalizeConfig(); return new RemoteRuntimeEngine(config.clone()); }