add comment to the task from the process itself

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-25-2012 06:20 AM
Also I have another question, where can I see/list the completed tasks? I can not find a task once it is marked completed, if it is not too much show me how in both explorer and using code.
- Labels:
-
Archive
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2012 04:11 AM
is it possible to add comment to the task from the design itself? i mean in the process design. bcause am creating a ticketing system and people should see the full history of the tickt and not only the cureent status/task.
What do you mean with comment? Do you mean comment as in taskService.addComment(…) ?
If so, the only way to do that is to add something like a task listener to your task that does that behind the scenes.
Also I have another question, where can I see/list the completed tasks? I can not find a task once it is marked completed, if it is not too much show me how in both explorer and using code.
Use the historyService. Once a task is completed, the task is moved to the historical tables.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2012 04:42 AM
What do you mean with comment? Do you mean comment as in taskService.addComment(…) ?
If so, the only way to do that is to add something like a task listener to your task that does that behind the scenes.
Yes this is exactly what I mean, does the listner have access to activiti context? i.e from where can I get the taskService in order to add the comment, is it accessible from the task itself or do I have to build a ProcessEngine and get the service from it!
Use the historyService. Once a task is completed, the task is moved to the historical tables.
Thanks for the clarification

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-26-2012 10:11 AM
please help understand how to achive this.
Thanks in advance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2012 02:33 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2012 02:42 AM
By writing your own ui and using the java api to retrieve all other comments?
Yes I already have my own UI, but I am unable to figure out how to get all the comments for a process not only one task in it, so this is my question…

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-27-2012 12:17 PM
You can use the TaskService getProcessInstanceComments or getTaskComments methods.
The process instance comments method only returns the comments that are explicitly added to that process instance.
Best regards,

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-28-2012 07:24 AM
You can use the TaskService getProcessInstanceComments or getTaskComments methods.
The process instance comments method only returns the comments that are explicitly added to that process instance.
we are making a progress

thanks a lot for the help
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-28-2012 07:47 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-28-2012 10:23 AM
List<org.activiti.engine.task.Task> activitiTasks = taskService.createTaskQuery().processInstanceId(processInstanceId).list();
List<HistoricTaskInstance> list = historyService.createHistoricTaskInstanceQuery().processInstanceId(processInstanceId).list();
then I loop on both lists to get events and finally sort my list by date
taskService.getTaskEvents(task.getTaskId());
