<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">
<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>
                                <td>
                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">Community</a></h1>
                                                                </td>
                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px; -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
Best way for implement this process
</h3>
<span style="margin-bottom: 10px;">
created by <a href="http://community.jboss.org/people/mcsawyer">John Sawyer</a> in <i>jBPM</i> - <a href="http://community.jboss.org/message/541387#541387">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">
<div class="jive-rendered-content"><p>I need to implement the next process:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>At first the process explote to five states,  this 5 states does the same (but are different because represents each one a unit).</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>- check if exists some file, if not, send and email and go to sleep 1 day, if exists we can leave this state.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>When 5 states are completed, we need to send an email to notify and this is all.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>==============</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>I test this... first i'm trying only with one state....</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p><?xml version="1.0" encoding="UTF-8"?></p><p><span><process name="WeekSignature" xmlns="</span><a class="jive-link-external-small" href="http://jbpm.org/4.3/jpdl" target="_blank">http://jbpm.org/4.3/jpdl</a><span>"></span><br/>   <start g="16,60,48,48" name="start1"><br/>      <transition name="to CGC" to="CGC" g="-39,-18"/><br/>   </start><br/>   <end g="672,60,48,48" name="end1"/>  </p><p><state g="176,100,92,52" name="CGC"><br/>     <on event="bucle"><br/>      <timer duedate="10 seconds" repeat="30 seconds"/><br/>          <event-listener  class="main.java.GuardianListener"><br/>              <field name="subunidad"><string value="CGC"/></field><br/>              <field name="email"><string value="xxx@xxx"/></field><br/>        </event-listener><br/>    </on><br/>      <transition name="to state1" to="state1" g="-49,-18"/><br/>   </state></p><p><br/>   <state g="380,58,92,52" name="state1"><br/>      <transition g="-72,-18" name="to end1" to="end1"/><br/>   </state>   <br/> </process></p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>=================</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>And in notify in event-listener i use (for complete the state...)</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>executionService().signalExecutionById(execution.getId());</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>====================</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>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.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>how can i reorganice this process?</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>I use jbpm 4.3</p><p style="min-height: 8pt; height: 8pt; padding: 0px;"> </p><p>thank you</p></div>
<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
<p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/541387#541387">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in jBPM at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2034">Community</a></p>
</div></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</div>
</body>
</html>