[jboss-user] [JBoss jBPM] - Re: Error in node-->TaskNode
harderwu
do-not-reply at jboss.com
Thu Aug 10 10:08:36 EDT 2006
again!
that is misspelled!!
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>
first,I can get a object of transition that name is "tra",
but there is an error when i get the object of tasknode by the transition.getTo()
TaskNode tasknode = (TaskNode) transition.getTo();
there is not the error if i get the object of node by by the transition.getTo()
| Node node = (Node) transition.getTo();
i know the node is the father class of the tasknode, i had seen the code in the exmaple of org.jbpm.test:
public void testTaskNode() {
| ProcessDefinition processDefinition = ProcessDefinition.parseXmlString(
| "<process-definition>" +
| " <task-node name='t' signal='first-wait' create-tasks='false'>" +
| " <task name='change the world once' blocking='true'>" +
| " <assignment class='anyonebutme' />" +
| " </task>" +
| " <task name='change the world twice' />" +
| " <task name='change the world three times' />" +
| " </task-node>" +
| "</process-definition>"
| );
|
| processDefinition = saveAndReload(processDefinition);
|
| TaskNode taskNode = ( TaskNode ) processDefinition. getNode("t");
| }
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3964373#3964373
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3964373
More information about the jboss-user
mailing list