[jboss-user] [JBoss jBPM] - Re: Error in node-->TaskNode
harderwu
do-not-reply at jboss.com
Sat Aug 12 07:50:40 EDT 2006
thanks,kukeltje
i want to get the next tasknode("b") by transition of the current node "a",
the ProcessDefinition:
<start-state name="a">
| <transition name="tra to="b">
| </transition>
| </start-state>
| <task-node name="b">
| <task name="first">
| <assignment class="com.test.assignment.PartMaster" config-type="bean">
| <groupName>leader</groupName>
| </assignment>
| </task>
| <transition name="tra2" to="c">
| </transition>
| </task-node>
my code :
.....
| (transition is the object of the "tra")
| Node node=transition.getTo();
| TaskNode tasknode = (TaskNode) node;
| Task tptask = tasknode.getTask("first");
| PartMaster parma = (PartMaster) tptask.getAssignmentDelegation()
| .getInstance();
| String tpstr = parma.getGroupName();
my goal is that i can get "leader" from the ProcessDefinition!but "ClassCastException" is Thrown in the second line,the description of ClassCastException:
/**
| * Thrown to indicate that the code has attempted to cast an object
| * to a subclass of which it is not an instance. For example, the
| * following code generates a <code>ClassCastException</code>:
| * <p><blockquote><pre>
| * Object x = new Integer(0);
| * System.out.println((String)x);
| * </pre></blockquote>
| *
| * @author unascribed
| * @version 1.20, 12/19/03
| * @since JDK1.0
| */do you understand my description?thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3964753#3964753
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3964753
More information about the jboss-user
mailing list