[jboss-user] [JBoss jBPM] - Unable to assign more than one group to a task???

sumit.jbpm do-not-reply at jboss.com
Wed Jul 30 06:07:31 EDT 2008


Hi there,

I am trying to assign 2 groups to a task, but I was not able to do that.
I referred to the jbpm-userguide document available at the following link http://docs.jboss.org/jbpm/v3/userguide/taskmanagement.html#theidentitycomponent

Here is the processDefinition.xml that I used:
<?xml version="1.0" encoding="UTF-8"?>
  | 
  | <process-definition
  |   xmlns="urn:jbpm.org:jpdl-3.2"  name="MultipleAssignmentProcess">
  |    <swimlane name="CD">
  |       <assignment expression="group(CD)"></assignment>
  |    </swimlane>   
  |    <start-state name="start">
  |       <transition name="" to="simpletask1"></transition>
  |    </start-state>
  |    <task-node name="simpletask1">
  |       <task name="simpletask1">
  |       <assignment expression="group(Sales) --> group(CM)"/>
  |       </task>
  |       <transition name="" to="simpletask2"></transition>
  |    </task-node>
  |    <task-node name="simpletask2">
  |       <task name="simpletask2" swimlane="CD">
  |       </task>
  |       <transition name="" to="end"></transition>
  |    </task-node>
  |    <end-state name="end"></end-state>
  | </process-definition>

This processDefinition.xml got deployed successfully but when I am trying to execute it by creating a processInstance, it is throwing the folowing error throwing java.lang.ClassCastException: org.jbpm.identity.Group: 
14:06:04,521 INFO  [STDOUT] ACTION :CreateProcess
  | 14:06:04,521 INFO  [STDOUT] PDNAME :MultipleAssignmentProcess
  | 14:06:04,521 INFO  [STDOUT] PROCESSINSTANCE ID :null
  | 14:06:04,521 INFO  [STDOUT] TASK ID :null
  | 14:06:04,536 INFO  [STDOUT] wfService : com.framework.workflow.WorkflowServiceImpl at 1188793
  | 14:06:04,536 INFO  [STDOUT] Inside WorkflowAdapter:createProcessInstance
  | 14:06:04,536 INFO  [STDOUT] Inside JBPMClient:createProcessInstance
  | 14:06:04,536 INFO  [STDOUT] JSPMContext: org.jbpm.JbpmContext at 16ce64e
  | 14:06:04,693 WARN  [ProxyWarnLog] Narrowing proxy to class org.jbpm.graph.node.TaskNode - this operation breaks ==
  | 14:06:04,771 INFO  [STDOUT] org.jbpm.graph.def.DelegationException: couldn't resolve assignment expression 'group(Sales) --> group(CM)'
  | 14:06:04,833 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
  | java.lang.ClassCastException: org.jbpm.identity.Group
  |         at org.jbpm.identity.assignment.ExpressionAssignmentHandler.resolveNextTerm(ExpressionAssignmentHandler.java:168)
  |         at org.jbpm.identity.assignment.ExpressionAssignmentHandler.assign(ExpressionAssignmentHandler.java:78)
  |         at org.jbpm.taskmgmt.exe.TaskMgmtInstance.performAssignmentDelegation(TaskMgmtInstance.java:271)
  |         at org.jbpm.taskmgmt.exe.TaskMgmtInstance.performAssignment(TaskMgmtInstance.java:244)
  |         at org.jbpm.taskmgmt.exe.TaskInstance.assign(TaskInstance.java:198)
  |         at org.jbpm.taskmgmt.exe.TaskMgmtInstance.createTaskInstance(TaskMgmtInstance.java:197)
  |         at org.jbpm.graph.node.TaskNode.execute(TaskNode.java:168)
  |         at org.jbpm.graph.def.Node.enter(Node.java:318)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  |         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:585)
  |         at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:173)
  |         at org.jbpm.graph.def.Node_$$_javassist_135.enter(Node_$$_javassist_135.java)
  |         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.StartState.leave(StartState.java:70)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  |         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:585)
  |         at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:173)
  |         at org.jbpm.graph.def.Node_$$_javassist_135.leave(Node_$$_javassist_135.java)
  |         at org.jbpm.graph.exe.Token.signal(Token.java:192)
  |         at org.jbpm.graph.exe.Token.signal(Token.java:140)
  |         at com.framework.workflow.jbpm.JBPMClient.createProcessInstance(JBPMClient.java:49)
  |         at com.framework.workflow.adapter.WorkflowAdapter.createProcessInstance(WorkflowAdapter.java:13)
  |         at com.framework.workflow.WorkflowServiceImpl.createProcessInstance(WorkflowServiceImpl.java:12)
  |         at org.apache.jsp.jsp.TestWorkflow_jsp._jspService(TestWorkflow_jsp.java:82)
  |         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
  |         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
  |         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
  |         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336)
  |         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
  |         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
  |         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
  |         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  |         at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
  |         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  |         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  |         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
  |         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
  |         at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
  |         at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
  |         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
  |         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
  |         at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
  |         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
  |         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
  |         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
  |         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
  |         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
  |         at java.lang.Thread.run(Thread.java:595)

And, when I define the swimlane tag like in the following processDefinition.xml:
 
  | <?xml version="1.0" encoding="UTF-8"?>
  | 
  | <process-definition
  |   xmlns="urn:jbpm.org:jpdl-3.2"  name="MultipleAssignmentProcess">   
  |    <swimlane name="Sales_CM">
  |       <assignment expression="group(Sales, CM)"></assignment>
  |    </swimlane>
  |    <swimlane name="CD_AD">
  |       <assignment expression="group(CD, AD)"></assignment>
  |    </swimlane>   
  |    <start-state name="start">
  |       <transition name="" to="simpletask1"></transition>
  |    </start-state>
  |    <task-node name="simpletask1">
  |       <task name="simpletask1" swimlane="Sales_CM"></task>
  |       <transition name="" to="simpletask2"></transition>
  |    </task-node>
  |    <task-node name="simpletask2">
  |       <task name="simpletask2" swimlane="CD_AD">
  |       </task>
  |       <transition name="" to="end"></transition>
  |    </task-node>
  |    <end-state name="end"></end-state>
  | </process-definition>

then I am getting the following error throwing org.jbpm.identity.assignment.ExpressionAssignmentException: group 'Sales, CM' couldn't be fetched from the user db:

  | 15:09:50,490 INFO  [STDOUT] ACTION :CreateProcess
  | 15:09:50,490 INFO  [STDOUT] PDNAME :MultipleAssignmentProcess
  | 15:09:50,490 INFO  [STDOUT] PROCESSINSTANCE ID :null
  | 15:09:50,490 INFO  [STDOUT] TASK ID :null
  | 15:09:50,490 INFO  [STDOUT] wfService : com.framework.workflow.WorkflowServiceImpl at 1c7a9de
  | 15:09:50,490 INFO  [STDOUT] Inside WorkflowAdapter:createProcessInstance
  | 15:09:50,490 INFO  [STDOUT] Inside JBPMClient:createProcessInstance
  | 15:09:50,490 INFO  [STDOUT] JSPMContext: org.jbpm.JbpmContext at 1615ef2
  | 15:09:50,599 WARN  [ProxyWarnLog] Narrowing proxy to class org.jbpm.graph.node.TaskNode - this operation breaks ==
  | 15:09:50,677 INFO  [STDOUT] org.jbpm.graph.def.DelegationException: couldn't resolve assignment expression 'group(Sales, CM)'
  | 15:09:50,771 ERROR [[jsp]] Servlet.service() for servlet jsp threw exception
  | org.jbpm.identity.assignment.ExpressionAssignmentException: group 'Sales, CM' couldn't be fetched from the user db
  |         at org.jbpm.identity.assignment.ExpressionAssignmentHandler.getGroupByName(ExpressionAssignmentHandler.java:200)
  |         at org.jbpm.identity.assignment.ExpressionAssignmentHandler.resolveFirstTerm(ExpressionAssignmentHandler.java:152)
  |         at org.jbpm.identity.assignment.ExpressionAssignmentHandler.assign(ExpressionAssignmentHandler.java:75)
  |         at org.jbpm.taskmgmt.exe.TaskMgmtInstance.performAssignmentDelegation(TaskMgmtInstance.java:271)
  |         at org.jbpm.taskmgmt.exe.TaskMgmtInstance.performAssignment(TaskMgmtInstance.java:244)
  |         at org.jbpm.taskmgmt.exe.TaskMgmtInstance.getInitializedSwimlaneInstance(TaskMgmtInstance.java:227)
  |         at org.jbpm.taskmgmt.exe.TaskInstance.assign(TaskInstance.java:191)
  |         at org.jbpm.taskmgmt.exe.TaskMgmtInstance.createTaskInstance(TaskMgmtInstance.java:197)
  |         at org.jbpm.graph.node.TaskNode.execute(TaskNode.java:168)
  |         at org.jbpm.graph.def.Node.enter(Node.java:318)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  |         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:585)
  |         at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:173)
  |         at org.jbpm.graph.def.Node_$$_javassist_307.enter(Node_$$_javassist_307.java)
  |         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.StartState.leave(StartState.java:70)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  |         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  |         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  |         at java.lang.reflect.Method.invoke(Method.java:585)
  |         at org.hibernate.proxy.pojo.javassist.JavassistLazyInitializer.invoke(JavassistLazyInitializer.java:173)
  |         at org.jbpm.graph.def.Node_$$_javassist_307.leave(Node_$$_javassist_307.java)
  |         at org.jbpm.graph.exe.Token.signal(Token.java:192)
  |         at org.jbpm.graph.exe.Token.signal(Token.java:140)
  |         at com.framework.workflow.jbpm.JBPMClient.createProcessInstance(JBPMClient.java:49)
  |         at com.framework.workflow.adapter.WorkflowAdapter.createProcessInstance(WorkflowAdapter.java:13)
  |         at com.framework.workflow.WorkflowServiceImpl.createProcessInstance(WorkflowServiceImpl.java:12)
  |         at org.apache.jsp.jsp.TestWorkflow_jsp._jspService(TestWorkflow_jsp.java:82)
  |         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
  |         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
  |         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:373)
  |         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:336)
  |         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265)
  |         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
  |         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
  |         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  |         at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
  |         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
  |         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  |         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
  |         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
  |         at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
  |         at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
  |         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
  |         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
  |         at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
  |         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
  |         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
  |         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
  |         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
  |         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
  |         at java.lang.Thread.run(Thread.java:595)

Did any one have any idea that why during the creation of processInstance I am getting the above errors??
If yes please reply to my questions.

When I remove the following tags from the above xmls: 
<assignment expression="group(Sales) --> group(CM)"/> and
  | <assignment expression="group(Sales, CM)"></assignment>
  |  
and do the assignment using swimlanes with each swimlane having ONLY one group contained in it like:

  | <swimlane name="CD">
  |       <assignment expression="group(CD)"></assignment>
  |    </swimlane>
Then I am able to execute the process successfully. No issues in this case.

NOTE: In my jbpm database I have proper entries in the jbpm_id_group table, for all the groups which I am assigning within the expression tags.

I know my question got long, but I tried to provide as much clarity as I can, inorder to get an accurate and early reply.
Please let me know if you need any other information.

Thanks in advance!!

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4167564#4167564

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4167564



More information about the jboss-user mailing list