[jboss-user] [jBPM] - Re: how to get the history tasks list use jbpm5, it's best to show the code, thanks!

xiaoxiao long do-not-reply at jboss.com
Sat Sep 29 05:57:04 EDT 2012


xiaoxiao long [https://community.jboss.org/people/mimi_2012] created the discussion

"Re: how to get  the history tasks list use jbpm5,it's best to show the code,thanks!"

To view the discussion, visit: https://community.jboss.org/message/762308#762308

--------------------------------------------------------------
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);

--------------------------------------------------------------

Reply to this message by going to Community
[https://community.jboss.org/message/762308#762308]

Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20120929/1a3fc03f/attachment.html 


More information about the jboss-user mailing list