[jboss-user] [JBoss jBPM] - Re: Ok, what am I missing?

steveotto999 do-not-reply at jboss.com
Tue Jan 2 18:37:30 EST 2007


Ronald, thanks for your help.

I've been trying to follow your suggestion but I have been unable to get some thing to work.

I've added the following test case to the HelloWorld test program in the distro.
Could you tell me what I should do to follow the execution down "path2"?

--steve


  | public void testProcessWithForkAndJoin() {
  |     ProcessDefinition processDefinition = ProcessDefinition.parseXmlString(
  |       "<process-definition>" +
  |       "  <start-state>" +
  |       "    <transition to='phase one' />" +
  |       "  </start-state>" +
  |       "  <state name='phase one'>" +
  |       "    <transition to='fork1' />" +
  |       "  </state>" +
  |       "  <fork name='fork1'>" +
  |       "    <transition name='tr1' to='path1' />" +
  |       "    <transition name='tr2' to='path2' />" +
  |       "  </fork>" +
  |       "  <state name='path1'>" +
  |       "    <transition to='join1' />" +
  |       "  </state>" +
  |       "  <state name='path2'>" +
  |       "    <transition to='join1' />" +
  |       "  </state>" +
  |       "  <join name='join1'>" +
  |       "    <transition to='end' />" +
  |       "  </join>" +
  |       "  <end-state name='end' />" +
  |       "</process-definition>"
  |     );
  |     
  |     ProcessInstance processInstance = 
  |         new ProcessInstance(processDefinition);
  |     Token token = processInstance.getRootToken();
  |     assertSame(processDefinition.getStartState(), token.getNode());
  | 
  |     token.signal();
  |     assertSame(processDefinition.getNode("phase one"), token.getNode());
  | 
  |     token.signal();
  |     assertSame(processDefinition.getNode("fork1"), token.getNode());
  |     
  |     token.signal("tr1");
  |     assertEquals("path1", token.getNode().getName());
  |     
  |     // correct up to here
  |     // how do I take path2?  Nothing I've tried seems to work
  |    
  |   }
  | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3997392#3997392

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3997392



More information about the jboss-user mailing list