use of org.jbpm.bpmn2.objects.Account in project kogito-runtimes by kiegroup.
the class ActivityTest method testBusinessRuleTaskWithExpressionsForIO.
@Test
@RequirePersistence(false)
public void testBusinessRuleTaskWithExpressionsForIO() throws Exception {
kruntime = createKogitoProcessRuntime("BPMN2-BusinessRuleTaskWithDataInputIOExpression.bpmn2", "BPMN2-BusinessRuleTaskWithDataInput.drl");
kruntime.getProcessEventManager().addEventListener(new RuleAwareProcessEventListener());
Map<String, Object> params = new HashMap<>();
params.put("person", new Person(null));
params.put("account", new Account());
KogitoProcessInstance processInstance = kruntime.startProcess("BPMN2-BusinessRuleTask", params);
assertProcessInstanceFinished(processInstance, kruntime);
Person person = (Person) processInstance.getVariables().get("person");
assertEquals("john", person.getName());
Account account = (Account) processInstance.getVariables().get("account");
assertNotNull(account.getPerson());
}
Aggregations