This content has been marked as final.
Show 5 replies
-
1. Re: classcast exception getting tasknode
kukeltje Oct 20, 2008 8:16 PM (in response to ajanz)basic hibernate issue. You get a proxy back. Search the internet/hibernate forums how to get the real node type object (I have no bookmark to this, but I think it is something that might be added in the wiki somewhere)
-
2. Re: classcast exception getting tasknode
ajanz Oct 21, 2008 6:29 AM (in response to ajanz)changed the code to
ProcessInstance pi = jbpmContext.getProcessInstance(processid); Task t = pi.getTaskMgmtInstance().getTaskMgmtDefinition().getTask("mytask");
now it works... -
3. Re: classcast exception getting tasknode
kukeltje Oct 21, 2008 7:15 AM (in response to ajanz)but this is a 'different node'... it is the node from the processdefinition, not from the processinstance. You cannot (afaik) do anything runtime with it (unless you e.g. want the transitionnames)
-
4. Re: classcast exception getting tasknode
ajanz Oct 21, 2008 7:31 AM (in response to ajanz)i need it to create a taskinstance
TaskInstance ti = pi.getTaskMgmtInstance() .createTaskInstance(t,pi.getRootToken()); ti.setActorId(actor.toUpperCase());
-
5. Re: classcast exception getting tasknode
kukeltje Oct 21, 2008 11:57 AM (in response to ajanz)then it is indeed ok to use it from the definition.