[jboss-user] [JBoss jBPM] - De-Persistence problem with Node?

pramero do-not-reply at jboss.com
Thu Feb 22 21:10:37 EST 2007


I'm using jBPM 3.1.4, Weblogic 8.1, Hibernate 3.2.2.

I stored the following test process definition:


  | <process-definition name='"joe"'>
  |   <start-state name='start'>
  | 	<transition to='s' />
  |    </start-state>
  |    <task-node name='myTaskNode'>
  | 	<transition to='end' />
  |     </task-node>
  |     <end-state name='end' />
  | </process-definition>
  | 

Then created an instance, and signaled() it once.

I then (later, in a different jbpmContext) do the following:


  |       ProcessInstance pi = context.loadProcessInstance(215);
  | 
  |       Token tok = pi.getRootToken();
  | 
  |       Node n = tok.getNode();
  | 
  | 
  |       System.out.println(n.getName());
  |       System.out.println(n.toString());
  |       System.out.println(n.getClass().getName());
  |       
  |       TaskNode n = (TaskNode)t2.getNode();
  | 

The output of the three System.out.println()s is:


  | myTaskNode
  | TaskNode(myTaskNode)
  | org.jbpm.graph.def.Node$$EnhancerByCGLIB$$92204161
  | 

Which is immediately followed by:

java.lang.ClassCastException

Which is obviously because the class "org.jbpm.graph.def.Node$$EnhancerByCGLIB$$92204161" cannot be cast to a TaskNode.

But how come the task knows it's a tasknode but isn't?  I say it knows it is a task node, because it's toString() method returns "TaskNode(myTaskNode)".



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

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



More information about the jboss-user mailing list