AnsweredAssumed Answered

HistoryService vs FormService (Undo a completed task)

Question asked by giovani on Mar 10, 2016
Latest reply on Mar 11, 2016 by martin.grofcik
Hi Guys,

I have been working for a while with Activiti now but I found that some things have been implemented in a different manner for one reason or another.

I know that there were some guys that asked this before "how to Undo a completed task"

I order to achieve this I would need to do the following steps:
1) Delete historic item id (remove task from Archive)
2) Create a new task with the same data as the original one had (add new task to the user inbox)

Easy right? Well it seems like HistoryService does not contain all the initial data !
Let me detail what I mean:
In TaskDetailPanel we have the below code:

This translates to the following in Inbox/My Task:

Now going to the Archived page to view the completed task the form data is not there at least the actual grid object has the value null

Looking the code for HistoricTaskDetailPanel

I have changed the code for HistoricTaskDetailPanel to match the one in the TaskDetailedPanel but when testing the below code:

The actual grid object that holds the whole table data is null. The question is Why?
Looking at the HistoricTaskDetailPanel class description I can understand that it's an architectural decision to remove that data from the database.

How and where it gets removed (which class does this?)

How can I get the History to hold that piece of information so that I can reuse it afterwards?