ElementId for terminating instruction

I have a simple BPMN with two sequential user tasks. Start->UT1->UT2->End. I am trying to terminate task instance relates to UT1. I tried with Java Zeebe client API


processInstanceKey = taken from Camunda operator
TaskId = Used TaskList REST API task/search. I can GET task/{id} from this

But this java code results in

Expected to modify instance of process ‘processInstanceKey’ but it contains one or more terminate instructions with an element instance that could not be found: taskId

What is the mistake I am doing here? Should the elementId for terminate instruction is something else than taskId?

Answering myself - It should flow node instance key not task Id

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.