1 Reply Latest reply on Mar 12, 2009 1:39 PM by Ronald van Kuijk

    Fork, Join SubProcess

    Margot Media Newbie

      Use Case
      - create a process definition that manage more sub-processes's instances.
      - after all sub-process are created wait until all sub-processes finish.

      I implemented this use case using a Custom Fork that create the sub-process, but the problem with it is that the Join don't wait until all processes finish.
      Could you give me an idea how to implement this?
      Thanks
      Next is my process definition and my action code.

      <?xml version="1.0" encoding="UTF-8"?>
      
      <process-definition xmlns="" name="notificaRegistrazione">
      
      
       <start-state name="Richiesta registrazione">
       <controller>
       <variable name="decisionCustom.counter" />
       </controller>
      
       <transition to="Crea Evento Azienda da visitare" name="inviaRegistrazione"></transition>
       </start-state>
      
      
       <task-node name="Crea Evento Azienda da visitare">
       <task name="crea_visita">
       <assignment pooled-actors="mediatore"></assignment>
       </task>
       <transition to="decisionCustom" name="invia"></transition>
       </task-node>
      
      
      
       <task-node name="Riempire questionario (Visualizza Admin)">
       <task name="compilaQuestionario">
       <assignment pooled-actors="utenteContadino"></assignment>
       </task>
       <transition to="Contadino Accettato" name="fine"></transition>
       </task-node>
      
       <process-state name="SubProcessNotifica">
       <sub-process name="notificaRequestReply"></sub-process>
       <variable access="read" name="provaMessaggio" mapped-name="notifyMessageRequest"></variable>
       <transition to="CustomJoin" name="forkJoinEnd"></transition>
       </process-state>
      
       <fork name="CustomFork" >
       <transition to="SubProcessNotifica" name="forkJoinStart"></transition>
       <transition to="decisionCustom" name="to decision1"></transition>
       </fork>
      
       <join name="CustomJoin">
       <transition to="Riempire questionario (Visualizza Admin)" name="rispostaQuestionario"></transition>
       </join>
      
       <decision name="decisionCustom">
       <handler class="org.domain.SeamAmiciDelGas.processes.CounterDecision"/>
       <transition to="CustomJoin" name="no"></transition>
       <transition to="CustomFork" name="yes"></transition>
       </decision>
      
       <end-state name="Contadino Accettato"></end-state>
      
      </process-definition>