1 Reply Latest reply on Dec 23, 2009 3:20 PM by kukeltje

    How to make a process run its flow without waiting for a sub-process to finish invoked???

      Hi

       

      I am working with jbpm-4.2 in tomcat and postgres and I want to know how can I make a proceso1 that calls a proceso2 by a sub-process,

       

      I want to be able to call and follow its flow proceso2 not wait to finish the proceso2. It´s possible??? How???

       

      Currently this proceso2 that proceso1 call and until the termination of proceso2 does not follow the flow of proceso1

       

      Deputy code and image what I intend to model

       

      <?xml version="1.0" encoding="UTF-8"?>
      <process name="GenerarInstancia" xmlns="http://jbpm.org/4.2/jpdl">
          <start g="3,77,48,48" name="inicio">
              <transition to="cant inicial pendiente"/>
            </start>
            <java class="com.configuracion.dao.PendientesDao" g="67,74,129,52" method="consultarRegistroPendiente" name="cant inicial pendiente" var="cantInicial">
              <transition to="verificar cant pendiente"/>
            </java>
            <state g="236,73,137,54" name="verificar cant pendiente">
              <on event="start">
            <timer duedate="1 minutes" repeat="10 seconds"/>
                  <event-listener class="com.configuracion.eventos.VerificarPendiente"/>
              </on>
              <transition g="-18,-18" name="evaluar" to="evaluar registros"/>
            </state>
          <decision g="415,75,48,48" name="evaluar registros">
              <transition to="consultar pendiente">
                  <condition expr="#{cantRegistro!=cantInicial}"/>
              </transition>
                <transition g="439,55;305,55:-17,-16" name="verificar" to="verificar cant pendiente">
                    <condition expr="#{cantRegistro==cantInicial}"/>
                </transition>
          </decision>
          <java class="com.configuracion.dao.PendientesDao" g="501,72,124,56" method="consultarDetallePendiente" name="consultar pendiente" var="hmPendiente">
              <transition to="instanciar"/>
          </java>
          <sub-process g="659,75,106,52" name="instanciar" sub-process-key="ProcesoPendiente">
              <parameter-in subvar="OBJSubPendiente" var="hmPendiente"/>
                <transition g="715,144;422,144;129,144:-31,6" name="iniciar" to="cant inicial pendiente"/>
          </sub-process>

      </process>

       

      Imagen.JPG

       

      Thanks