3 Replies Latest reply on Feb 27, 2007 9:29 AM by Ronald van Kuijk

    Problem with sending a mail using notify=

    bazoo Newbie

      Hi, I'm trying to send an email to the current process actor using the notify="yes" attribute in jbpm 3.2beta. My code is as follows:

      <task-node name="Name band">
       <task name="Name band" swimlane="Record producer" notify="yes">
       <controller>
       <variable name="bandName" access="read,write,required" mapped-name="Band name"></variable>
       </controller>
       </task>
       <transition name="" to="Organize vocal tuition"></transition>
       </task-node>


      Trouble is that I get a nullpointerexception in the web console. Turning on logging this is the relevant error:

      20:51:56,795 DEBUG [GraphElement] event 'before-signal' on 'TaskNode(All contrac
      ts agreed?)' for 'Token(/)'
      20:51:56,797 DEBUG [GraphElement] event 'node-leave' on 'TaskNode(All contracts
      agreed?)' for 'Token(/)'
      20:51:56,798 DEBUG [GraphElement] event 'transition' on 'Transition(Yes)' for 'T
      oken(/)'
      20:51:56,801 DEBUG [GraphElement] event 'node-enter' on 'TaskNode(Name band)' fo
      r 'Token(/)'
      20:51:56,804 WARN [ProxyWarnLog] Narrowing proxy to class org.jbpm.graph.node.T
      askNode - this operation breaks ==
      20:51:56,808 DEBUG [TaskController] creating task instance variable 'Band name'
      from process variable 'bandName', value 'null'
      20:51:56,809 DEBUG [VariableContainer] create variable 'Band name' in 'TaskInsta
      nce[Name band]' with value 'null'
      20:51:56,811 DEBUG [GraphElement] event 'task-create' on 'Task(Name band)' for '
      Token(/)'
      20:51:56,816 DEBUG [ExpressionAssignmentHandler] resolving first term 'group(Rec
      ord producer)'
      20:51:56,821 DEBUG [TaskInstance] assigning task 'Name band' to 'null'
      20:51:56,822 DEBUG [GraphElement] event 'task-assign' on 'Task(Name band)' for '
      Token(/)'
      20:51:56,824 DEBUG [GraphElement] executing action 'Action(a1e97a)'
      20:51:56,825 DEBUG [Token] token[36] is locked by token[36]
      20:51:56,829 DEBUG [Token] token[36] is unlocked by token[36]
      20:51:56,830 ERROR [GraphElement] action threw exception: null
      java.lang.NullPointerException
      at java.util.StringTokenizer.(StringTokenizer.java:182)
      at java.util.StringTokenizer.(StringTokenizer.java:204)
      at org.jbpm.mail.Mail.tokenize(Mail.java:148)
      at org.jbpm.mail.Mail.getRecipients(Mail.java:70)
      at org.jbpm.mail.Mail.send(Mail.java:111)
      at org.jbpm.mail.Mail.execute(Mail.java:63)
      at org.jbpm.graph.def.Action.execute(Action.java:122)
      at org.jbpm.graph.def.GraphElement.executeAction(GraphElement.java:247)
      at org.jbpm.graph.def.GraphElement.executeActions(GraphElement.java:215)

      at org.jbpm.graph.def.GraphElement.fireAndPropagateEvent(GraphElement.ja
      va:185)
      at org.jbpm.graph.def.GraphElement.fireEvent(GraphElement.java:169)
      at org.jbpm.taskmgmt.exe.TaskInstance.setActorId(TaskInstance.java:289)
      at org.jbpm.taskmgmt.exe.TaskInstance.setActorId(TaskInstance.java:263)
      at org.jbpm.taskmgmt.exe.TaskInstance.copySwimlaneInstanceAssignment(Tas
      kInstance.java:239)
      at org.jbpm.taskmgmt.exe.TaskInstance.assign(TaskInstance.java:195)
      at org.jbpm.taskmgmt.exe.TaskMgmtInstance.createTaskInstance(TaskMgmtIns
      tance.java:153)
      at org.jbpm.taskmgmt.exe.TaskMgmtInstance$$FastClassByCGLIB$$e1d53490.in
      voke()
      at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
      at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.intercept(CGLIBLa
      zyInitializer.java:163)
      at org.jbpm.taskmgmt.exe.TaskMgmtInstance$$EnhancerByCGLIB$$bc339adf.cre
      ateTaskInstance()
      at org.jbpm.graph.node.TaskNode.execute(TaskNode.java:169)
      at org.jbpm.graph.def.Node.enter(Node.java:318)
      at org.jbpm.graph.def.Node$$FastClassByCGLIB$$d187eeda.invoke()
      at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
      at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.intercept(CGLIBLa
      zyInitializer.java:163)
      at org.jbpm.graph.def.Node$$EnhancerByCGLIB$$f1bcc41d.enter()

      at org.jbpm.graph.def.Transition.take(Transition.java:151)
      at org.jbpm.graph.def.Node.leave(Node.java:393)
      at org.jbpm.graph.node.TaskNode.leave(TaskNode.java:210)
      at org.jbpm.graph.node.TaskNode$$FastClassByCGLIB$$923668a4.invoke(<gene
      rated>)
      at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
      at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.intercept(CGLIBLa
      zyInitializer.java:163)
      at org.jbpm.graph.node.TaskNode$$EnhancerByCGLIB$$2dc073db.leave(<genera
      ted>)
      at org.jbpm.graph.exe.Token.signal(Token.java:190)
      at org.jbpm.graph.exe.Token.signal(Token.java:161)
      at org.jbpm.graph.exe.Token$$FastClassByCGLIB$$74df1c6e.invoke(<generate
      d>)
      at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
      at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.intercept(CGLIBLa
      zyInitializer.java:163)
      at org.jbpm.graph.exe.Token$$EnhancerByCGLIB$$21163199.signal()
      at org.jbpm.taskmgmt.exe.TaskInstance.end(TaskInstance.java:471)
      at org.jbpm.taskmgmt.exe.TaskInstance.end(TaskInstance.java:410)
      at org.jbpm.taskmgmt.exe.TaskInstance$$FastClassByCGLIB$$cb2c21af.invoke
      ()
      at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
      at org.hibernate.proxy.pojo.cglib.CGLIBLazyInitializer.intercept(CGLIBLa
      zyInitializer.java:163)
      at org.jbpm.taskmgmt.exe.TaskInstance$$EnhancerByCGLIB$$f20b86cc.end(<ge
      nerated>)
      at org.jbpm.webapp.tag.tf.ui.TaskForm$TaskFormActionListener.processActi
      on(TaskForm.java:280)
      at javax.faces.event.ActionEvent.processListener(ActionEvent.java:77)
      at javax.faces.component.UIComponentBase.broadcast(UIComponentBase.java:
      758)
      at javax.faces.component.UICommand.broadcast(UICommand.java:368)
      at org.jbpm.webapp.tag.tf.ui.AbstractTaskFormButton.broadcast(AbstractTa
      skFormButton.java:51)
      at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:448)

      at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:7
      52)
      at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicat
      ionPhase.java:97)
      at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:248)
      at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)

      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
      icationFilterChain.java:252)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
      ilterChain.java:173)
      at org.jbpm.webapp.filter.LogFilter.doFilter(LogFilter.java:59)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
      icationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
      ilterChain.java:173)
      at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFi
      lter.java:96)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
      icationFilterChain.java:202)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
      ilterChain.java:173)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperV
      alve.java:213)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextV
      alve.java:178)
      at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit
      yAssociationValve.java:175)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(Authentica
      torBase.java:524)
      at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv
      e.java:74)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.j
      ava:126)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.j
      ava:105)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineVal
      ve.java:107)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.jav
      a:148)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java
      :869)
      at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.p
      rocessConnection(Http11BaseProtocol.java:664)
      at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpo
      int.java:527)
      at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWor
      kerThread.java:112)
      at java.lang.Thread.run(Thread.java:595)
      20:51:56,903 ERROR [TaskForm] Error taking transition: null
      20:51:56,904 DEBUG [TaskForm] Transaction failed, rolling back
      20:51:56,905 DEBUG [JbpmNavigationHandler] Using existing navigation state
      20:51:56,906 DEBUG [JbpmNavigationHandler] Chosen outcome 'error'
      20:51:56,907 DEBUG [StayOutcome] Explicitly staying on current view
      20:51:56,908 DEBUG [JbpmNavigationHandler] Created new navigation state
      20:51:56,909 DEBUG [JbpmNavigationHandler] No outcomes defined; staying on curre
      nt view (navigation state not found)


      Any ideas?