use of org.jbpm.bpmn2.objects.Address in project jbpm by kiegroup.
the class ActivityTest method testMultipleBusinessRuleTaskWithDataInputsWithPersistence.
@Test
public void testMultipleBusinessRuleTaskWithDataInputsWithPersistence() throws Exception {
KieBase kbase = createKnowledgeBaseWithoutDumper("BPMN2-MultipleRuleTasksWithDataInput.bpmn2", "BPMN2-MultipleRuleTasks.drl");
ksession = createKnowledgeSession(kbase);
ksession.addEventListener(new TriggerRulesEventListener(ksession));
List<String> listPerson = new ArrayList<String>();
List<String> listAddress = new ArrayList<String>();
ksession.setGlobal("listPerson", listPerson);
ksession.setGlobal("listAddress", listAddress);
Person person = new Person();
person.setName("john");
Address address = new Address();
address.setStreet("5th avenue");
Map<String, Object> params = new HashMap<String, Object>();
params.put("person", person);
params.put("address", address);
ProcessInstance processInstance = ksession.startProcess("multiple-rule-tasks", params);
assertEquals(1, listPerson.size());
assertEquals(1, listAddress.size());
assertProcessInstanceFinished(processInstance, ksession);
}
Aggregations