Complete external-task through JSON

Hi folks,

I developed a bpm which has an external-task. I have to complete the task through application/json.
I read lots of post, examples, and practically the whole camunda documentation but I still struggle with that.
I tried to post an application/json to my TomCat server


POST application/json (body):
“workerId”: “demo”,

Unfortunately, I always got the same reply from the server:

    "type": "RestException",
    "message": "External Task ID_MY_EXTERNAL_TASK cannot be completed by worker 'demo'. It is locked by worker 'null'."

I tried to post a fetchAndLock, but I always received the same answer:


        "type": "NullValueException",
        "message": "workerId is null"

Please, do you have any clue about what I am doing wrong or if I missed a previous step?
Any kind of information will be appreciate.



PS: I uploaded my bpmn in case that it would (8.9 KB)

Hi Antonio,

what payload did you send on the ‘fetchAndLock’ request?

The payload must include the ‘workerId’ (in your case “demo”).

For example:

      [{"topicName": "transcodeVideo",
      "lockDuration": 10000

Please have a look at the docs.

Best regards,

Thanks Philipp_Ossler, finally I managed it . Thanks a lot!