@After public void tearDown() throws Exception { javax.transaction.TransactionManager txm = com.arjuna.ats.jta.TransactionManager.transactionManager(); assertTrue("There is still a transaction running!", txm.getTransaction() == null ); cleanUp(context); logService.dispose(); }
logService.dispose(); Assertions.assertThat(processInstances).isEmpty();
logService.dispose(); Assertions.assertThat(processInstances).isEmpty();
logService.dispose(); Assertions.assertThat(processInstances).isNullOrEmpty();
logService.dispose(); Assertions.assertThat(processInstances).isNullOrEmpty();
@Test @RequirePersistence public void testCallActivityWithHistoryLog() throws Exception { KieBase kbase = createKnowledgeBase("BPMN2-CallActivity.bpmn2", "BPMN2-CallActivitySubProcess.bpmn2"); ksession = createKnowledgeSession(kbase); Map<String, Object> params = new HashMap<String, Object>(); params.put("x", "oldValue"); ProcessInstance processInstance = ksession.startProcess( "ParentProcess", params); assertProcessInstanceCompleted(processInstance); assertEquals("new value", ((WorkflowProcessInstance) processInstance).getVariable("y")); AuditLogService logService = new JPAAuditLogService(ksession.getEnvironment()); List<ProcessInstanceLog> subprocesses = logService.findSubProcessInstances(processInstance.getId()); assertNotNull(subprocesses); assertEquals(1, subprocesses.size()); logService.dispose(); }
@Test @RequirePersistence public void testScriptTaskWithHistoryLog() throws Exception { KieBase kbase = createKnowledgeBase("BPMN2-ScriptTask.bpmn2"); ksession = createKnowledgeSession(kbase); ProcessInstance processInstance = ksession.startProcess("ScriptTask"); assertProcessInstanceCompleted(processInstance); AuditLogService logService = new JPAAuditLogService(ksession.getEnvironment()); List<NodeInstanceLog> logs = logService.findNodeInstances(processInstance.getId()); assertNotNull(logs); assertEquals(6, logs.size()); for (NodeInstanceLog log : logs) { assertNotNull(log.getDate()); } ProcessInstanceLog pilog = logService.findProcessInstance(processInstance.getId()); assertNotNull(pilog); assertNotNull(pilog.getEnd()); List<ProcessInstanceLog> pilogs = logService.findActiveProcessInstances(processInstance.getProcessId()); assertNotNull(pilogs); assertEquals(0, pilogs.size()); logService.dispose(); }
@After public void tearDown() throws Exception { javax.transaction.TransactionManager txm = com.arjuna.ats.jta.TransactionManager.transactionManager(); assertTrue("There is still a transaction running!", txm.getTransaction() == null ); cleanUp(context); logService.dispose(); }
logService.dispose(); Assertions.assertThat(processInstances).isEmpty();
logService.dispose(); Assertions.assertThat(processInstances).isEmpty();
logService.dispose(); Assertions.assertThat(processInstances).isNullOrEmpty();
logService.dispose(); Assertions.assertThat(processInstances).isNullOrEmpty();
@Test @RequirePersistence public void testCallActivityWithHistoryLog() throws Exception { KieBase kbase = createKnowledgeBase("BPMN2-CallActivity.bpmn2", "BPMN2-CallActivitySubProcess.bpmn2"); ksession = createKnowledgeSession(kbase); Map<String, Object> params = new HashMap<String, Object>(); params.put("x", "oldValue"); ProcessInstance processInstance = ksession.startProcess( "ParentProcess", params); assertProcessInstanceCompleted(processInstance); assertEquals("new value", ((WorkflowProcessInstance) processInstance).getVariable("y")); AuditLogService logService = new JPAAuditLogService(ksession.getEnvironment()); List<ProcessInstanceLog> subprocesses = logService.findSubProcessInstances(processInstance.getId()); assertNotNull(subprocesses); assertEquals(1, subprocesses.size()); logService.dispose(); }
@Test @RequirePersistence public void testScriptTaskWithHistoryLog() throws Exception { KieBase kbase = createKnowledgeBase("BPMN2-ScriptTask.bpmn2"); ksession = createKnowledgeSession(kbase); ProcessInstance processInstance = ksession.startProcess("ScriptTask"); assertProcessInstanceCompleted(processInstance); AuditLogService logService = new JPAAuditLogService(ksession.getEnvironment()); List<NodeInstanceLog> logs = logService.findNodeInstances(processInstance.getId()); assertNotNull(logs); assertEquals(6, logs.size()); for (NodeInstanceLog log : logs) { assertNotNull(log.getDate()); } ProcessInstanceLog pilog = logService.findProcessInstance(processInstance.getId()); assertNotNull(pilog); assertNotNull(pilog.getEnd()); List<ProcessInstanceLog> pilogs = logService.findActiveProcessInstances(processInstance.getProcessId()); assertNotNull(pilogs); assertEquals(0, pilogs.size()); logService.dispose(); }