List completed task

Hi,

Is there any way to list completed task of an user in task list .? He should also see the completed user task form from task list .

Thanks
AJR

1 Like

Hi,

after having a quick look at the list of available criteria for filters it does not look like it’s possble.

Cheers

1 Like

Hi @vale ,

I know its not available in the camudna built. I want to know whether anyone had done any extra efforts to include these things.?

Thanks
Ajr

@Ajr with the enterprise cockpit plugin for viewing history, you could see historical task information.

But you could also run: https://docs.camunda.org/manual/7.5/reference/rest/history/task/get-task-query/ and use the “finished” parameter, to pull the same type of data. You would have to build a plugin or the tasklist.

Hi @StephenOTT ,

Thanks for your support. Am planning to write a plugin for tasklist. My idea is on the left pannel i should have a link for completed tasks when user click it should show completed tasks of that user in the middle panel. When he clicks one task , a filled user task form will be displayed on right panel.

Any guidance will be helpful

Regards
Ajr

1 Like

That was my plan exactly too.
But it seems to me at the moment, that the tasks disappear from being available via [REST] API as soon as they completed.
The only way to access their metadata is /history/task and separate /history/variable-instance but that doesn’t allow to use dynamic form to display historical values.

So it seems that the use case for users re-viewing the completed tasks needs to be explicitly encoded in BPMN or CMMN process, though that doesn’t seem to be any trivial.

I believe its part/caused by the overall engine design and the History tables: as soon as someone is completed is stops existing in the “runtime” tables and only exists in the history tables. So it all depends on what your first source for querying the data is (/task or /history/task).

Thank you Stephen!
I have no problems accessing /history/task
It’s just I don’t see how can I use the dynamic nature of the user task forms in that case.
I cannot find the task’s formKey in the /history/task to show the historical data.

Started to think about modelling the historical view as special business process step with real uncompleted tasks. But that seems to make my model significantly complicated.
Or maybe I’ll try to save the formKey in the task variables using a custom listener to make it available in the history.

So ya form key specially seems to be hard to look up as part of the history (based on my quick view of historyService). As a quick work around you could setup a Input Mapping on the user task which is the form key, so the mapping would create a local variable against the user task. Then set your user task’s form key value to be a expression such as ${myLocalVarName}. Then you can use the variable history queries to look up the form key that was used for that specific user task instance.
If you find another way to look up for the form key, please share.

Sergey, hi!
Was it possible to create an extension for viewing completed tasks?