How to get a Task assigned date and Task Completed Date

Hi Community

I am trying to save the Details for each task. I need to collect 3 information for each task.

  1. The date when the task was available to the group.
  2. The Date when an approver has picked up the task
  3. The Date when the Task was completed.

The available rest api shows the 1 and 3 Dates. not the 2 date.

Could Somebody suggest how I can proceed here.
Also is there any way to track if a user has accepted a task and then released it.
Could we use a groovy script to fetch these details and store in Database .

Thanks in Advance.

Hi Dibyajit,

When you want to collect information from tasks in the REST API, you have 2 ways to do it :

  • Requesting in HumanTask API (bpmAPI)
  • Requesting in ArchivedHumanTask API (bpmAPI)

Here is the link to bpmAPI documentation .

HumanTask will give you data related to ongoing process instances whereas ArchivedHumanTask is related to all archived data on completed tasks.

To collect your information, you can use “reached_state_date” object which gives you the date when your task reaches a certain state. The states are « ready » « completed » «failed» for both HumanTask and ArchivedHumanTask

  1. You use “assigned_date” (from HumanTask or ArchivedHumanTask depending on what you want to do with the data) to get the date when the task is available
  2. You will request »reach_state_date » as « ready » and the value of “executedBy” to get the date and the name of the person who has executed the task
  3. And to get the date when your task has been completed, use reach_state_date as « completed » in archivedHumanTask

For my information, how do you want to use this data ?

To answer your second question, as of today we have no data historization system for task assignment. Therefore you will only be able to see the last state and assignee.
Nevertheless, case overview page displays part of the REST API data

Hi,

Throught the operation's script I tried to get the assigned date of a human task without success.

I success to get the human task with the id but with the apiAccessor we don't have any access of this date.

There is a way to retrieve this information ?

 

Thanks

Thank you Delphine.
I will definitely check it out.