ProcessContext extends AbstractProcessContext { public CaseData getCaseData() { Collection<? extends Object> objects = getKieRuntime().getObjects(new ClassObjectFilter(CaseData.class)); if (objects.size() == 0) { return null; } return (CaseData) objects.iterator().next(); } ProcessContext(KieRuntime kruntime); CaseData getCaseData(); CaseAssignment getCaseAssignment();  }
@Test public void testProcessContextGetData() { KieBase kbase = KnowledgeBaseFactory.newKnowledgeBase(); KieSession ksession = kbase.newKieSession(); assertNotNull(ksession); CaseInformation caseInfo = new CaseInformation(); caseInfo.add("test", "value"); ksession.insert(caseInfo); ProcessContext processContext = new ProcessContext(ksession); CaseData caseData = processContext.getCaseData(); assertNotNull(caseData); Map<String, Object> allData = caseData.getData(); assertNotNull(allData); assertEquals(1, allData.size()); assertEquals("value", caseData.getData("test")); }