1 Reply Latest reply on Jul 31, 2012 7:00 AM by ivtelo

    Problems with foreach, join and task with timer in JBPM 4.4

    ivtelo

      Hi everybody,

       

      First, environment:

       

          - JBPM 4.4

          - Tomcat 6.0.35

           - MySQL 5.5

       

      I start the process with jbmp-console.

       

      ###############################################################

       

      I have two process to get the same (complete task with timer):

       

      First process:

       

      <process name="InlineMail" xmlns="http://jbpm.org/4.4/jpdl">

        <variable init-expr="NUEVO" name="estadoProceso" type="string"/>

        <start g="35,52,80,40">

            <transition g="-46,-20" name="to task1" to="foreach1"/>

        </start>

         <end g="581,99,48,48" name="end1"/>

         <task assignee="#{usuario}" form="es/vass/form/formTareaSupervisor.ftl" g="298,150,92,52" name="task1">

                     <on event="timeout">

                      <timer duedate="60 seconds"/>

                      <event-listener class="es.vass.util.TimerEvent" />

            </on>

            <transition name="to join1" to="join1" g="-45,-20"/>

         </task>

         <foreach g="244,227,48,48" in="ela1,ela2" name="foreach1" var="usuario">

            <transition g="-46,-20" name="to task1" to="task1"/>

         </foreach>

         <join g="415,188,48,48" multiplicity="2" name="join1">

            <transition name="to end1" to="end1" g="-45,-20"/>

         </join>

      </process>

       

      In the timeEvent class, complete Task.

       

      Second process:

       

      <process name="InlineMail" xmlns="http://jbpm.org/4.4/jpdl">

        <variable init-expr="NUEVO" name="estadoProceso" type="string"/>

        <start g="35,52,80,40">

            <transition g="-46,-20" name="to task1" to="foreach1"/>

        </start>

         <end g="581,99,48,48" name="end1"/>

         <task assignee="#{usuario}" form="es/vass/form/formTareaSupervisor.ftl" g="298,150,92,52" name="task1">

            <transition name="to join1" to="join1" g="-45,-20">

                <timer duedate="60 seconds"/>

             </transition

         </task>

         <foreach g="244,227,48,48" in="ela1,ela2" name="foreach1" var="usuario">

            <transition g="-46,-20" name="to task1" to="task1"/>

         </foreach>

         <join g="415,188,48,48" multiplicity="2" name="join1">

            <transition name="to end1" to="end1" g="-45,-20"/>

         </join>

      </process>

       

      The problem is that neither process ends, but tasks completes correctly.What's the problem???

       

      Regards,

      Iván.

        • 1. Re: Problems with foreach, join and task with timer in JBPM 4.4
          ivtelo

          Hi all again,

           

          I still have the same problem.

           

          What I'm trying to do is assign the same task to some users (with foreach), and tasks must have expiration date.

           

          With a timer in the transition or a timer event, the task completes successfully, but not the process.

           

          What can happen? Is there any other way to do it?

           

          Regards,

          Ivan.