1 Reply Latest reply on Mar 5, 2009 10:47 AM by andy.moody

    Issue with Forks and Sub Processes

    andy.moody

      Apologies if this issue has been raised before on the forums - I couldn't see it anywhere so I thought I'd raise it.

      I have a relatively simple process which looks like this:

      http://picasaweb.google.co.uk/lh/photo/J6Ac8qDY25vjhev-GSXz1g?feat=directlink

      This seems to cause issues when the End State is reached, throwing the following exception:

      org.jbpm.JbpmException: couldn't signal without specifying a leaving transition : transition is null


      This appears to be caused because the process enters the first state of the first branch of the fork rather than remaining in the fork - thus creating a subprocess for the parent token as well as for each of the child tokens.
      When the end state is entered the EndState execution tries to end this unused subprocess - which in turn tries to notify it's parent token - which then tries to take a transition out of the end state.
      The only way I can find to work round this is to do something more like the following:

      http://picasaweb.google.co.uk/lh/photo/Q5piNh-hOCvSqdvrWeB4PQ?feat=directlink

      Does anyone have any ideas of a better workaround or whether I'm doing something wrong?
      Alternately - should I raise this as an issue?