multiInstanceBody activity is not ending

Hi,

in my process (see attached) I have a multi-instance marker. The marker works fine and generates e.g. 2 activities that start new a new process each. After that they are completed and have an endTime if I query them. However there is still an activity existing that is not completed and has no endTime. It is also shown in the cockpit.

If I query the activity I get these properties:

{
“id”: “09db7aa7-65fa-11eb-a59f-b831b581fead”,
“parentActivityInstanceId”: “095078a7-65fa-11eb-a59f-b831b581fead”,
“activityId”: “StartCategorizationProcess#multiInstanceBody”,
“activityName”: null,
“activityType”: “multiInstanceBody”,
“processDefinitionKey”: “digitalization-postoffice”,
“processDefinitionId”: “digitalization-postoffice:3:6e7cebb6-65f7-11eb-a59f-b831b581fead”,
“processInstanceId”: “095078a7-65fa-11eb-a59f-b831b581fead”,
“executionId”: “09db7aa6-65fa-11eb-a59f-b831b581fead”,
“taskId”: null,
“calledProcessInstanceId”: null,
“calledCaseInstanceId”: null,
“assignee”: null,
“startTime”: “2021-02-03T09:30:14.654+0100”,
“endTime”: null,
“durationInMillis”: null,
“canceled”: false,
“completeScope”: false,
“tenantId”: null,
“removalTime”: null,
“rootProcessInstanceId”: “095078a7-65fa-11eb-a59f-b831b581fead”
}

As you can see there is no endTime and the activityId has a “multiInstanceBody” at the end. Why is this activity not removed as soon as the generated activites of the multi-instance are finished? You can see that they are finished below:

{
“id”: “StartCategorizationProcess:09dcb339-65fa-11eb-a59f-b831b581fead”,
“parentActivityInstanceId”: “09db7aa7-65fa-11eb-a59f-b831b581fead”,
“activityId”: “StartCategorizationProcess”,
“activityName”: “Start Categorization Process”,
“activityType”: “sendTask”,
“processDefinitionKey”: “digitalization-postoffice”,
“processDefinitionId”: “digitalization-postoffice:3:6e7cebb6-65f7-11eb-a59f-b831b581fead”,
“processInstanceId”: “095078a7-65fa-11eb-a59f-b831b581fead”,
“executionId”: “09dcb338-65fa-11eb-a59f-b831b581fead”,
“taskId”: null,
“calledProcessInstanceId”: null,
“calledCaseInstanceId”: null,
“assignee”: null,
“startTime”: “2021-02-03T09:30:14.662+0100”,
“endTime”: “2021-02-03T09:38:05.332+0100”,
“durationInMillis”: 470670,
“canceled”: false,
“completeScope”: true,
“tenantId”: null,
“removalTime”: null,
“rootProcessInstanceId”: “095078a7-65fa-11eb-a59f-b831b581fead”
},
{
“id”: “StartCategorizationProcess:09dd4f7d-65fa-11eb-a59f-b831b581fead”,
“parentActivityInstanceId”: “09db7aa7-65fa-11eb-a59f-b831b581fead”,
“activityId”: “StartCategorizationProcess”,
“activityName”: “Start Categorization Process”,
“activityType”: “sendTask”,
“processDefinitionKey”: “digitalization-postoffice”,
“processDefinitionId”: “digitalization-postoffice:3:6e7cebb6-65f7-11eb-a59f-b831b581fead”,
“processInstanceId”: “095078a7-65fa-11eb-a59f-b831b581fead”,
“executionId”: “09dd4f7c-65fa-11eb-a59f-b831b581fead”,
“taskId”: null,
“calledProcessInstanceId”: null,
“calledCaseInstanceId”: null,
“assignee”: null,
“startTime”: “2021-02-03T09:30:14.666+0100”,
“endTime”: “2021-02-03T09:38:06.372+0100”,
“durationInMillis”: 471706,
“canceled”: false,
“completeScope”: true,
“tenantId”: null,
“removalTime”: null,
“rootProcessInstanceId”: “095078a7-65fa-11eb-a59f-b831b581fead”
}

I am using Camunda 7.11.

Here is the solution:

1 Like