-
1. Re: how to get the history tasks list use jbpm5,it's best to show the code,thanks!
drupalspring Sep 12, 2012 6:28 AM (in response to mimi_2012)In master branch , it seems that a TasksAdmin interface is added . This interface can be created by the TaskSessionFactory and has the followings methods that seems can achieve your purpose :
- public List<TaskSummary> getCompletedTasks();
- public List<TaskSummary> getCompletedTasks(Date since);
- public List<TaskSummary> getArchivedTasks();
-
2. Re: how to get the history tasks list use jbpm5,it's best to show the code,thanks!
mimi_2012 Sep 12, 2012 11:33 PM (in response to drupalspring)thanks for your help,I use jbpm5.2,it seems that without this interface,
-
3. Re: how to get the history tasks list use jbpm5,it's best to show the code,thanks!
mimi_2012 Sep 29, 2012 5:56 AM (in response to mimi_2012)I hava acheive this function :
public ModelAndView historyTasks(HttpServletRequest request,Task task){
ModelAndView mv = new ModelAndView();
ModelMap mp = new ModelMap("historyTasks");
StatefulKnowledgeSession ksession = jbpmSupport.getKsession();
TaskService taskService = jbpmSupport.getTaskService();
String username = (String) request.getSession().getAttribute("uname");String sqlquery = "from Task where status='Completed'and createdBy_id='"+username+"'";
List<Task> tasks = (List<Task>) taskService.query(sqlquery, sqlquery.length(), 0);
mp.put("tasks", tasks);
mp.put("task", task);