Submitted variables in Task Complete does not show

I have created a Process with a user task.
I have sent in a Post - Task Complete with variables to Camunda rest engine.

Running
GET /task/{id}/variables
I get a 200, but only {} back

can I view the history, to see that the variabels where persisted or can I view the variables somewhere in Camunda Cockpit

Hi @TommyK100
For completed tasks, you might want to take a look at the following Historic calls
https://docs.camunda.org/manual/7.15/reference/rest/history/task/post-task-query/
https://docs.camunda.org/manual/7.15/reference/rest/history/variable-instance/post-variable-instance-query/

Regards,
Alex

Thanks! Works but in the result, both finished and unfinished is undefined. How come?

Hi @TommyK100
Could you please elaborate on what you mean in more detail? Some examples of tasks, rest call response or/and screenshots would be helpful to understand the issue.

My rest call : static async ShowTasksHistory(url: string, req: any)
{
let headers = new Headers();
headers.set(‘Content-type’, ‘application/json’);
const f = await fetch(CamundaHelper.baseUrl + url, {
method: ‘GET’,
headers: headers,
});
let r = await f.json();
return r;
}

{TaskHistory.id}, {TaskHistory.name}, {TaskHistory.created}, {TaskHistory.caseExecutionId}, {TaskHistory.startTime}, {TaskHistory.endTime}, {TaskHistory.finished}, {TaskHistory.unfinished},

All data shows up in the response, but both finished and unfinshed is undefined in the response.

Both finished and unfinshed are the filters of the rest call. The rest call response does not include any values for it.

In other words when you specify finished or unfinished or both you filter the resulting response by these parameters. For example, if you specified “finished” then only the finished tasks will be returned and you know for sure that the value of the “finished” is true.

Now everything works fine, just by adding it to the request made it work!

@TommyK100 Great that it worked! Please make the answer a solution for the issue and mark the topic as solved. This way it will be visible to others that the question was answered.