i've written my own command to create tasks at runtime.
but when i try to get the tasknode i got an class cast exception
2008-10-20 17:26:23,496 INFO [STDOUT] node name:in Bearbeitung
2008-10-20 17:26:23,496 INFO [STDOUT] node class:class
org.jbpm.graph.def.Node_$$_javassist_80
2008-10-20 17:26:23,496 ERROR [STDERR] java.lang.ClassCastException:
org.jbpm.graph.def.Node_$$_javassist_80 cannot be cast to
org.jbpm.graph.node.TaskNode
although it is really a tasknode...
what am i doing wrong?
here is the code
ProcessInstance pi =
jbpmContext.getProcessInstance(processid);
|
| if
(cat.isDebugEnabled()) {
| cat.debug("add
task command");
|
cat.debug("token:"+ pi.getRootToken().getId());
| cat.debug("node
name:"+ pi.getRootToken().getNode().getName());
| cat.debug("node
class:"+ pi.getRootToken().getNode().getClass());
| }
| TaskNode tn =
(TaskNode) pi.getRootToken().getNode();
| Task t=
tn.getTask("mytask");
|
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4183285#4183285
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4183285
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user