2 Replies Latest reply on May 6, 2010 5:17 AM by mcsawyer

    Best way for implement this process

    mcsawyer

      I need to implement the next process:

       

      At first the process explote to five states,  this 5 states does the same (but are different because represents each one a unit).

       

      - check if exists some file, if not, send and email and go to sleep 1 day, if exists we can leave this state.

       

      When 5 states are completed, we need to send an email to notify and this is all.

       

      ==============

       

      I test this... first i'm trying only with one state....

       

      <?xml version="1.0" encoding="UTF-8"?>

      <process name="WeekSignature" xmlns="http://jbpm.org/4.3/jpdl">
         <start g="16,60,48,48" name="start1">
            <transition name="to CGC" to="CGC" g="-39,-18"/>
         </start>
         <end g="672,60,48,48" name="end1"/> 

      <state g="176,100,92,52" name="CGC">
           <on event="bucle">
            <timer duedate="10 seconds" repeat="30 seconds"/>
                <event-listener  class="main.java.GuardianListener">
                    <field name="subunidad"><string value="CGC"/></field>
                    <field name="email"><string value="xxx@xxx"/></field>
              </event-listener>
          </on>
            <transition name="to state1" to="state1" g="-49,-18"/>
         </state>


         <state g="380,58,92,52" name="state1">
            <transition g="-72,-18" name="to end1" to="end1"/>
         </state>  
      </process>

       

      =================

       

      And in notify in event-listener i use (for complete the state...)

       

      executionService().signalExecutionById(execution.getId());

       

      ====================

       

      I think that this is not the best way for do this.. and when i put fork and join, the signal doesn't work and the process remain blocked.

       

       

      how can i reorganice this process?

       

      I use jbpm 4.3

       

      thank you