I am a little bit confused about the two api endpoints, the operate service offers. I got a process, which failed with an incident. The first REST API (/api/process-instances/2251799814030697) returns me an state=INCIDENT for this process, as i expected it.
{
"id" : "2251799814030697",
"processId" : "2251799814030681",
"processName" : "p_85094497-259e-40e7-aafe-9a17f08d95af",
"processVersion" : 8,
"startDate" : "2023-05-31T10:50:30.845+0000",
"endDate" : null,
"state" : "INCIDENT",
The second API i was using so far (/v1/process-instances/2251799814030697) returns me a state=ACTIVE
{
"key": 2251799814030697,
"processVersion": 8,
"bpmnProcessId": "p_85094497-259e-40e7-aafe-9a17f08d95af",
"startDate": "2023-05-31T10:50:30.845+0000",
"state": "ACTIVE",
"processDefinitionKey": 2251799814030681
}
My goal is, to see, if a process is currently running, or completed or failed. But with the v1-API i can not get this with the process-instances-endpoint.
Why are there this two APIs and why did they return different values for the same variable?