Example #1
0
        public virtual void testQueryBySuperCaseInstanceId()
        {
            string superCaseInstanceId = caseService.createCaseInstanceByKey("oneCaseTaskCase").Id;

            HistoricCaseInstanceQuery query = historyService.createHistoricCaseInstanceQuery().superCaseInstanceId(superCaseInstanceId);

            assertEquals(1, query.list().size());
            assertEquals(1, query.count());

            HistoricCaseInstance caseInstance = query.singleResult();

            assertEquals(superCaseInstanceId, caseInstance.SuperCaseInstanceId);
            assertNull(caseInstance.SuperProcessInstanceId);
        }
Example #2
0
        public virtual void testQueryBySuperProcessInstanceId()
        {
            string superProcessInstanceId = runtimeService.startProcessInstanceByKey("subProcessQueryTest").Id;

            HistoricCaseInstanceQuery query = historyService.createHistoricCaseInstanceQuery().superProcessInstanceId(superProcessInstanceId);

            assertEquals(1, query.list().size());
            assertEquals(1, query.count());

            HistoricCaseInstance subCaseInstance = query.singleResult();

            assertNotNull(subCaseInstance);
            assertEquals(superProcessInstanceId, subCaseInstance.SuperProcessInstanceId);
            assertNull(subCaseInstance.SuperCaseInstanceId);
        }