When I use the APi to get process instances of a definition key it returns all instances!
The filter doesn’t work: (there’s a bug)
calling /history/process-instance?procesDefinitionKey=Gipodproces
gives back all instances of all definition keys including:
{
"id": "ffdd5548-0807-11ea-af85-00505683e8a2",
"businessKey": null,
"processDefinitionId": "Planaanvraagproces:77:b47f47a4-d460-11e9-b51b-7c5cf8d534ec",
"processDefinitionKey": "**Planaanvraagproces**",
"processDefinitionName": null,
"processDefinitionVersion": 77,
"startTime": "2019-11-16T01:28:23.870+0100",
"endTime": "2019-11-16T01:28:23.870+0100",
"removalTime": null,
"durationInMillis": 0,
"startUserId": null,
"startActivityId": "StartEvent_1",
"deleteReason": null,
"rootProcessInstanceId": "ffdd5548-0807-11ea-af85-00505683e8a2",
"superProcessInstanceId": null,
"superCaseInstanceId": null,
"caseInstanceId": null,
"tenantId": null,
"state": "COMPLETED"
},
I actually used ,the non-historic one which has the same problem, this list in a loop to delete all the instances and all of a sudden my production db was empty.
I had to restore it from the database!