hi,
this is the problem:
Home.jsp------>viewtask.jsp
int the action Taskaction i open a jbpmcurrentcontext and i attribute to him an actorid.
in the page : viewtask.jsp , when I want to get the actorid the response was null .
My code :
1. a part of web.xml
<filter> <filter-name>JbpmContextFilter</filter-name> <filter-class>org.jbpm.web.JbpmContextFilter</filter-class> </filter> <filter-mapping> <filter-name>JbpmContextFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping>
.... Taskform taskform = (Taskform) form; String username = taskform.getUsername(); JbpmContext jbpmcontext=JbpmContext.getCurrentJbpmContext(); jbpmcontext.setActorId(username); ....
<TABLE border="1" width="200px"> <% Tasklist tl=new Tasklist(); String actor=tl.acteur(); Iterator it = tl.tache(actor).iterator(); while(it.hasNext()) { %> <TR> <TD><%=it.next()%></TD> </TR> <% } %> </TABLE>
public class Tasklist{ public String acteur() { JbpmContext jbpmcontext=JbpmContext.getCurrentJbpmContext(); return (jbpmcontext.getActorId()) ; } public List tache(String s){ JbpmContext jbpmcontext=JbpmContext.getCurrentJbpmContext(); TaskMgmtSession taskmgmtsession =jbpmcontext.getTaskMgmtSession(); List l = taskmgmtsession.findTaskInstances(s) ; return l; } }
What are the contents of the jbpm.cfg.xml file? Please verify that this file is on the classpath?
Regards,
Koen