Hello,
i’m trying to complete a common Human Task in CMMN-Process by using the Task Service, but in step 2 i get always a List with size 0. Until version 7.4 i have done it in the following way:
- Get Case Executions by caseInstanceId (That is working fine and gives me in my case one active CasePlanModel and 3 tasks in status enabled
List CaseExecution caseExecutions = engine.getCaseService()
.createCaseExecutionQuery()
.caseInstanceId(caseInstanceId)
.list();
- Let’s say i choose one execution in the list and want to get the corresponding task. For example:
execution = caseExecutions.get(0)
Task task = engine.getTaskService().createTaskQuery().caseExecutionId(execution.getId()).list().get(0);
In Version 7.4 that was working fine (got this apporach from an underwriting CMMN example in the git repository. In 7.5 The list of the query is allways empty. I have tried it in the full distribution and with the manual installation with myMSQL-Database. In both cases this way ist not working anymore In the sql-scripts i could see, that in the table act_ru_case_execution
there is a column act_ID, which is not declared as a foreign key. Is that right and maybe the reaseon, why this is not working anymore?
- Complete the task (Because 2 is not working i have no task to complete…
this.engine.getTaskService().complete(task.getId(), variables);
- How can i complete a common humanTask of a CMMN-process in Camunda version 7.5?
- In which case the case in step 2) the query will give me a list with more than one Object? Is there not a 1:1 relationship between task and case execution?
I’m a little mit in pressure in my master-thesis and would be very grateful, if you can help me to complete a human task (or any other task ) in a CMMN-Processinstance.
In the appendix you can see an example CaseExecution object:
Thanks a lot!