1 Reply Latest reply on Feb 14, 2006 3:53 AM by boerse scholz

    Simple (and tricky) question on assigment

    boerse scholz Newbie

      Hi

      I have a node which i would like to be executed or by the previous user that started the process (previous), or by another guy. I'm trying to make a group in the processdefinition.xml and identity.db.xml: Here are they:

      <identity>
       <user name="cookie monster" email="cookie.monster@sesamestreet.tv" password="crunchcrunch" />
       <user name="ernie" email="ernie@sesamestreet.tv" password="canthereyoubert,theresabananainmyear" />
       <user name="bert" email="bert@sesamestreet.tv" password="ernie,theresabananainyourear" />
       <user name="grover" email="grover@sesamestreet.tv" password="mayday mayday" />
       <user name="peggy" email="peggy@sesamestreet.tv" password="oink oink" />
       <group name="gname" type="gtype"/>
       <membership name="nmember" role="nrole" user="peggy" group="gname" />
       <membership name="nmember" role="nrole" user="ernie" group="gname" />
      </identity>


      processdefinition.xml
      <task-node name="evaluate web order">
       <task>
       <assignment expression='previous--> group(gtype) --> member(nrole)' />
       <timer duedate="20 seconds" repeat="10 seconds">
       <action class="org.jbpm.websale.RemindActor">
       <swimlaneName>salesman</swimlaneName>
       </action>
       </timer>
       <controller>
       <variable name="item" access="read"/>
       <variable name="quantity" access="read"/>
       <variable name="address" access="read"/>
       <variable name="reference" access="read"/>
       <variable name="comment"/>
       </controller>
       </task>
      


      and the error is that the system cannot resolve the names. Does anybody know how this could be done? I'm sure this question will be very useful not only for me but for all the ones that are "fighting" with the assignments.

      N.B: I tried without the part member too, and it does not work at all. The only thing it does is with only "previous", but i need user "ernie" too!

      12:25:29,719 DEBUG [Services] closing service 'logging': org.jbpm.logging.db.DbL
      oggingService@157816a
      12:25:29,719 DEBUG [Services] closing service 'authentication': org.jbpm.securit
      y.authentication.DefaultAuthenticationService@1f16e6e
      12:25:29,729 ERROR [[FacesServlet]] Servlet.service() for servlet FacesServlet t
      hrew exception
      javax.faces.FacesException: Error calling action method of component with id tas
      kform:transitionButton
       at org.apache.myfaces.application.ActionListenerImpl.processAction(Actio
      nListenerImpl.java:74)
       at javax.faces.component.UICommand.broadcast(UICommand.java:106)
       at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:9
      0)
       at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:1
      64)
       at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(Lifecycl
      eImpl.java:271)
       at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java
      :86)
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:94)
       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.AuthenticationFilter.doFilter(AuthenticationFi
      lter.java:55)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
      icationFilterChain.java:202)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationF
      ilterChain.java:173)
       at org.jbpm.web.JbpmContextFilter.doFilter(JbpmContextFilter.java:83)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appl
      icationFilterChain.java:202)
       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:81)
       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.CustomPrincipalValve.invoke(CustomPrinc
      ipalValve.java:39)
       at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(Securit
      yAssociationValve.java:159)
       at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValv
      e.java:59)
       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
      :856)
       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proce
      ssConnection(Http11Protocol.java:744)
       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:534)
      Caused by: javax.faces.el.EvaluationException: Exception while invoking expressi
      on #{taskBean.saveAndClose}
       at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java
      :153)
       at org.apache.myfaces.application.ActionListenerImpl.processAction(Actio
      nListenerImpl.java:63)
       ... 34 more
      Caused by: org.jbpm.graph.def.DelegationException
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:349)
      
       at org.jbpm.graph.def.GraphElement$$FastClassByCGLIB$$7a7d6aa6.invoke(<g
      enerated>)
       at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
       at org.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializ
      er.java:136)
       at org.jbpm.graph.def.ProcessDefinition$$EnhancerByCGLIB$$a8719597.raise
      Exception(<generated>)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:343)
      
       at org.jbpm.graph.def.GraphElement$$FastClassByCGLIB$$7a7d6aa6.invoke(<g
      enerated>)
       at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
       at org.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializ
      er.java:136)
       at org.jbpm.graph.node.TaskNode$$EnhancerByCGLIB$$328093f1.raiseExceptio
      n(<generated>)
       at org.jbpm.graph.def.GraphElement.raiseException(GraphElement.java:343)
      
       at org.jbpm.taskmgmt.exe.TaskMgmtInstance.performAssignment(TaskMgmtInst
      ance.java:205)
       at org.jbpm.taskmgmt.exe.TaskMgmtInstance$$FastClassByCGLIB$$e1d53490.in
      voke(<generated>)
       at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
       at org.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializ
      er.java:136)
       at org.jbpm.taskmgmt.exe.TaskMgmtInstance$$EnhancerByCGLIB$$57e4e5dd.per
      formAssignment(<generated>)
       at org.jbpm.taskmgmt.exe.TaskInstance.assign(TaskInstance.java:176)
       at org.jbpm.taskmgmt.exe.TaskMgmtInstance.createTaskInstance(TaskMgmtIns
      tance.java:146)
       at org.jbpm.taskmgmt.exe.TaskMgmtInstance$$FastClassByCGLIB$$e1d53490.in
      voke(<generated>)
       at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
       at org.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializ
      er.java:136)
       at org.jbpm.taskmgmt.exe.TaskMgmtInstance$$EnhancerByCGLIB$$57e4e5dd.cre
      ateTaskInstance(<generated>)
       at org.jbpm.graph.node.TaskNode.execute(TaskNode.java:167)
       at org.jbpm.graph.def.Node.enter(Node.java:315)
       at org.jbpm.graph.def.Node$$FastClassByCGLIB$$d187eeda.invoke(<generated
      >)
       at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
       at org.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializ
      er.java:136)
       at org.jbpm.graph.def.Node$$EnhancerByCGLIB$$5bdffd27.enter(<generated>)
      
       at org.jbpm.graph.def.Transition.take(Transition.java:113)
       at org.jbpm.graph.def.Node.leave(Node.java:381)
       at org.jbpm.graph.node.StartState.leave(StartState.java:70)
       at org.jbpm.graph.def.Node$$FastClassByCGLIB$$d187eeda.invoke(<generated
      >)
       at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
       at org.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializ
      er.java:136)
       at org.jbpm.graph.def.Node$$EnhancerByCGLIB$$5bdffd27.leave(<generated>)
      
       at org.jbpm.graph.exe.Token.signal(Token.java:174)
       at org.jbpm.graph.exe.Token.signal(Token.java:123)
       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.CGLIBLazyInitializer.intercept(CGLIBLazyInitializ
      er.java:136)
       at org.jbpm.graph.exe.Token$$EnhancerByCGLIB$$ecb064bb.signal(<generated
      >)
       at org.jbpm.taskmgmt.exe.TaskInstance.end(TaskInstance.java:407)
       at org.jbpm.taskmgmt.exe.TaskInstance.end(TaskInstance.java:321)
       at org.jbpm.taskmgmt.exe.TaskInstance$$FastClassByCGLIB$$cb2c21af.invoke
      (<generated>)
       at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
       at org.hibernate.proxy.CGLIBLazyInitializer.intercept(CGLIBLazyInitializ
      er.java:136)
       at org.jbpm.taskmgmt.exe.TaskInstance$$EnhancerByCGLIB$$499767c.end(<gen
      erated>)
       at org.jbpm.webapp.bean.TaskBean.saveAndClose(TaskBean.java:178)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
      java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:324)
       at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java
      :129)
       ... 35 more
      Caused by: org.jbpm.identity.assignment.ExpressionAssignmentException: couldn't
      resolve assignment expression 'previous--> group(gtype) --> member(nrole)'
       at org.jbpm.identity.assignment.ExpressionAssignmentHandler.assign(Expre
      ssionAssignmentHandler.java:97)
       at org.jbpm.taskmgmt.exe.TaskMgmtInstance.performAssignmentDelegation(Ta
      skMgmtInstance.java:216)
       at org.jbpm.taskmgmt.exe.TaskMgmtInstance.performAssignment(TaskMgmtInst
      ance.java:192)
       ... 76 more
      Caused by: org.jbpm.identity.assignment.ExpressionAssignmentException: no groups
       for group-type 'gtype'
       at org.jbpm.identity.assignment.ExpressionAssignmentHandler.resolveNextT
      erm(ExpressionAssignmentHandler.java:171)
       at org.jbpm.identity.assignment.ExpressionAssignmentHandler.assign(Expre
      ssionAssignmentHandler.java:78)
       ... 78 more
      12:25:32,554 DEBUG [JbpmContextInfo] creating jbpm context with service factorie
      s '[message, scheduler, logging, persistence, authentication]'
      12:25:32,554 DEBUG [JbpmContext] creating JbpmContext