How to get a Task assigned date and Task Completed Date
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.
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
- 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
- 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
- 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
Thank you Delphine.
I will definitely check it out.