[jboss-dev-forums] [Design of JBoss jBPM] - Re: initial nodes

thedog do-not-reply at jboss.com
Thu Feb 15 09:07:00 EST 2007


Seems that I stumbled across a similar problem (avoiding signal after process create) but with different solution.

Therefore two questions:

* Is this signal really required? I searched the documents but did not find anything stating that this is necessary

* To me it seems that a node.enter is missing at end of
   public ProcessInstance( ProcessDefinition processDefinition ):

Currently:

    // fire the process start event
  |     if (rootToken.getNode()!=null) {
  |       ExecutionContext executionContext = new ExecutionContext(rootToken);
  |       processDefinition.fireEvent(Event.EVENTTYPE_PROCESS_START, executionContext);
  |     }
  | 
But the node is always unitialised (null) when starting a process

Would that be the right way?

  |    rootToken.setNode(processDefinition.getStartState())
  |    ExecutionContext executionContext = new ExecutionContext(rootToken);
  |    processDefinition.fireEvent(Event.EVENTTYPE_PROCESS_START, executionContext);
  | 

Could someone point out if I'm going the right direction? Are there problems with sub-processes or other jbpm features when using the code from above?


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

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



More information about the jboss-dev-forums mailing list