use of org.kie.kogito.process.bpmn2.BpmnProcess in project automatiko-engine by automatiko-io.
the class SmileRandomForestPredictionTest method testUserTaskWithPredictionService.
@Test
public void testUserTaskWithPredictionService() {
BpmnProcess process = (BpmnProcess) BpmnProcess.from(config, new ClassPathResource("BPMN2-UserTask.bpmn2")).get(0);
process.configure();
ProcessInstance<BpmnVariables> processInstance = process.createInstance(BpmnVariables.create(Collections.singletonMap("test", "test")));
processInstance.start();
assertEquals(STATE_COMPLETED, processInstance.status());
Model result = (Model) processInstance.variables();
assertEquals(2, result.toMap().size());
assertEquals("predicted value", result.toMap().get("s"));
}
Aggregations