use of io.crnk.activiti.example.model.ApproveForm in project crnk-framework by crnk-project.
the class ApprovalIntTest method checkApproveTaskCreated.
private void checkApproveTaskCreated(Schedule schedule, ApproveTask task) {
Assert.assertEquals("approveScheduleTask", task.getTaskDefinitionKey());
ApproveForm form = task.getForm();
Assert.assertNotNull(form);
Assert.assertFalse(form.isApproved());
}
use of io.crnk.activiti.example.model.ApproveForm in project crnk-framework by crnk-project.
the class ApprovalIntTest method approve.
private void approve(ApproveTask task) {
QuerySpec taskQuery = new QuerySpec(ApproveTask.class);
taskQuery.includeRelation(Arrays.asList("form"));
ApproveForm form = task.getForm();
form.setApproved(true);
form = formRepo.create(form);
Assert.assertTrue(form.isApproved());
Assert.assertEquals("POSTing form must close the task", 0, taskRepo.findAll(taskQuery).size());
}
Aggregations