This content has been marked as final.
Show 3 replies
-
1. Re: TaskNode ClassCastException
tibocu Mar 9, 2006 8:41 AM (in response to tibocu)Strange,
If of write:
1 Token token = processInstance.getRootToken();
2 Node node = processDefinition.getNode(token.getNode().getName());
3 TaskNode taskNode = (TaskNode)node;
It works !
It looks that the Node returned by the token is not correctly instanciated.
Something I didn't get or a bug ? -
2. Re: TaskNode ClassCastException
tibocu Mar 9, 2006 8:56 AM (in response to tibocu)Fixed by writing:
1 Token token = processInstance.getRootToken();
2 TaskNode taskNode = (TaskNode)jbpmContext.
getSession().
load(TaskNode.class, token.getNode().getId());
See:
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=73123 -
3. Re: TaskNode ClassCastException
tom.baeyens Mar 9, 2006 1:51 PM (in response to tibocu)this is one of the hibernate limitations of using proxies. see hibernate reference manual for more info.
reloading through the session is indeed the best approach.
regards, tom.