[JBoss jBPM] - classcast exception getting tasknode
by AJanz
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
15 years, 8 months
[JBoss jBPM] - Re: passing task variables
by memius
I think that in the multi fork case, you know how many parallel processes you need on node entry (based on the process variable).
But I think that is not applicable for the case I am facing ;)
I mean : I am dealing with the insurance business... In theory, it is possible to close a claim (main process closed) but afterwards, there is new data available... so some parts (sub processes) could be started again.
I think the same happens when you are dealing with legal files, ...
So that is why I have A. the subprocess (there is always at least one invoice, which I have to wait for a certain time in the flow and afterwards some automatic handling can be started) and B. that sub process can be started seperately (in the case there are n invoices)
On the one hand I think that this might be again some weird situation I am facing (I don't have years of work flow experience). But otherwise, I think there must be quite some situations where this can actually happen (so I might not be designing processes from Mars ;) )
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4183219#4183219
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4183219
15 years, 8 months