Good questions, Let me try to clarify them for you<br><br><div class="gmail_quote">On Thu, Apr 8, 2010 at 10:25 AM, jeanjvr <span dir="ltr">&lt;<a href="mailto:jeanjvr@live.co.za">jeanjvr@live.co.za</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><br>
First I want to thank Kris for responding to my direct email - very quick<br>
response!<br>
<br>
I&#39;ll move over to the mailing list for now.<br>
<br>
I went and read the documentation for Flow and constructed a test flow<br>
attached to an application that launches and controls it. I did this is<br>
Eclipse for now using the GUI to test the applicability of the a work-flow<br>
engine to a simple manufacturing task.<br>
<br>
I attach a PNG image<br>
(<a href="http://i349.photobucket.com/albums/q388/shooter_za/jvr_test_flow.png" target="_blank">http://i349.photobucket.com/albums/q388/shooter_za/jvr_test_flow.png</a>) and a<br>
trimmed log of my flow just for interest sake at the end.<br>
<br>
My test Java app starts the flow in a new thread and allows me to trigger<br>
events in the flow with buttons (processInstance.signalEvent(String type,<br>
Object data)). If I use Drools in my project, the events would be generated<br>
by factory devices through an industrial protocol called OPC.<br>
<br>
<br>
Some noob questions:<br>
<br>
1. I need concurrent execution in my flow. I use Split nodes to do this. Is<br>
this the correct way to achieve concurrency?<br></blockquote><div>No really, if you want to represent with your business processes concurrent tasks you use split and join nodes.<br>But if you are talking about multi-threaded programming this is not a good choice. You can create multi-thread and concurrent code<br>
to run inside a custom work item, but the concurrent threads will not be visible in the processes graph. <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<br>
2. I need to construct control loops. Pieces of the flow that execute over<br>
and over until a constraint<br>
directs flow to an End node. I see no reason why loops cannot be done in<br>
DROOLS flow.<br></blockquote><div>You can use for each nodes for that kind of behaviors. Where the loop will be executed N times based on a variable/collection <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<br>
3. My biggest problem at this time is that my flow executes, but &quot;ignores&quot;<br>
Event nodes connected to AND Join nodes. The work-flow then ends and my<br>
thread exits, although the End nodes in question are not reached according<br>
to the log.<br></blockquote><div>Can you provide a test case that demonstrate this behavior? <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<br>
I suppose the engine determines that no terminating End node can be reached<br>
and stops. I think that I maybe have an incorrect understanding of some<br>
aspect of the DROOLS work-flow engine.<br>
<br>
The core idea is to let one or more flows reach an AND Join node - and then<br>
wait until all Event nodes attached to the AND Join node is triggered,<br>
allowing the flow to continue.<br>
<br>
<br>
<br>
<br>
Other problems I will not list here now, as I believe I may be able to<br>
figure them out (variables, constraints). I just want to prove that Flow can<br>
be used.<br>
<br>
<br>
Anybody got any advice for me?<br>
<br>
Thanks<br>
<br>
Jean<br>
<br>
<br>
<br>
<br>
<a href="http://n3.nabble.com/file/n706102/jvr_test_flow.png" target="_blank">http://n3.nabble.com/file/n706102/jvr_test_flow.png</a><br>
<br>
<br>
BEFORE RULEFLOW NODE TRIGGERED node:Start[id=1]<br>
<br>
BEFORE RULEFLOW NODE TRIGGERED node:AND - Split Flow - Two concurent<br>
Processes[id=3]<br>
<br>
BEFORE RULEFLOW NODE TRIGGERED node:Start Conveyor 1[id=4]<br>
<br>
<br>
<br>
Start Conveyor 1<br>
<br>
<br>
<br>
BEFORE RULEFLOW NODE TRIGGERED node:Stop Conveyor 1[id=38]<br>
<br>
<br>
<br>
Stop Conveyor 1<br>
<br>
<br>
<br>
BEFORE RULEFLOW NODE TRIGGERED node:End[id=9]<br>
<br>
AFTER RULEFLOW NODE TRIGGERED node:End[id=9]<br>
<br>
AFTER RULEFLOW NODE TRIGGERED node:Stop Conveyor 1[id=38]<br>
<br>
AFTER RULEFLOW NODE TRIGGERED node:Start Conveyor 1[id=4]<br>
<br>
BEFORE RULEFLOW NODE TRIGGERED node:Start Conveyor 2[id=5]<br>
<br>
<br>
<br>
Start Conveyor 2<br>
<br>
<br>
<br>
BEFORE RULEFLOW NODE TRIGGERED node:AND - Split Flow - Three concurent<br>
Processes[id=6]<br>
<br>
BEFORE RULEFLOW NODE TRIGGERED node:Start Conveyor 3[id=7]<br>
<br>
<br>
<br>
Start Conveyor 3<br>
<br>
<br>
<br>
BEFORE RULEFLOW NODE TRIGGERED node:Disciminator - Join - Continue if any<br>
input[id=10]<br>
<br>
BEFORE RULEFLOW NODE TRIGGERED node:Load A onto conveyor 3[id=12]<br>
<br>
<br>
<br>
Load one subassembly A on to Conveyor 3<br>
<br>
<br>
<br>
BEFORE RULEFLOW NODE TRIGGERED node:Split - After Load A onto conveyor<br>
3[id=17]<br>
<br>
BEFORE RULEFLOW NODE TRIGGERED node:Discriminator - Join - Continue if any<br>
input[id=13]<br>
<br>
BEFORE RULEFLOW NODE TRIGGERED node:AND Join - Continue if all input[id=51]<br>
<br>
AFTER RULEFLOW NODE TRIGGERED node:AND Join - Continue if all input[id=51]<br>
<br>
AFTER RULEFLOW NODE TRIGGERED node:Discriminator - Join - Continue if any<br>
input[id=13]<br>
<br>
BEFORE RULEFLOW NODE TRIGGERED node:AND Join - Continue if all input[id=42]<br>
<br>
AFTER RULEFLOW NODE TRIGGERED node:AND Join - Continue if all input[id=42]<br>
<br>
AFTER RULEFLOW NODE TRIGGERED node:Split - After Load A onto conveyor<br>
3[id=17]<br>
<br>
AFTER RULEFLOW NODE TRIGGERED node:Load A onto conveyor 3[id=12]<br>
<br>
AFTER RULEFLOW NODE TRIGGERED node:Disciminator - Join - Continue if any<br>
input[id=10]<br>
<br>
AFTER RULEFLOW NODE TRIGGERED node:Start Conveyor 3[id=7]<br>
<br>
BEFORE RULEFLOW NODE TRIGGERED node:Discriminator Join - Continue if any<br>
input[id=26]<br>
<br>
BEFORE RULEFLOW NODE TRIGGERED node:Load B onto Conveyor 2[id=8]<br>
<br>
<br>
<br>
Load one subassembly B onto conveyor 2<br>
<br>
<br>
<br>
BEFORE RULEFLOW NODE TRIGGERED node:Split - After load B onto conveyor<br>
2[id=24]<br>
<br>
BEFORE RULEFLOW NODE TRIGGERED node:Discriminator Join - Continue if any<br>
input[id=47]<br>
<br>
BEFORE RULEFLOW NODE TRIGGERED node:AND Join - Continue if all input[id=52]<br>
<br>
AFTER RULEFLOW NODE TRIGGERED node:AND Join - Continue if all input[id=52]<br>
<br>
AFTER RULEFLOW NODE TRIGGERED node:Discriminator Join - Continue if any<br>
input[id=47]<br>
<br>
BEFORE RULEFLOW NODE TRIGGERED node:AND Join - Continue if all input[id=49]<br>
<br>
AFTER RULEFLOW NODE TRIGGERED node:AND Join - Continue if all input[id=49]<br>
<br>
AFTER RULEFLOW NODE TRIGGERED node:Split - After load B onto conveyor<br>
2[id=24]<br>
<br>
AFTER RULEFLOW NODE TRIGGERED node:Load B onto Conveyor 2[id=8]<br>
<br>
AFTER RULEFLOW NODE TRIGGERED node:Discriminator Join - Continue if any<br>
input[id=26]<br>
<br>
BEFORE RULEFLOW NODE TRIGGERED node:Disciminator - Join - Continue if any<br>
input[id=37]<br>
<br>
BEFORE RULEFLOW NODE TRIGGERED node:AND Join - Continue if all input[id=39]<br>
<br>
AFTER RULEFLOW NODE TRIGGERED node:AND Join - Continue if all input[id=39]<br>
<br>
AFTER RULEFLOW NODE TRIGGERED node:Disciminator - Join - Continue if any<br>
input[id=37]<br>
<br>
AFTER RULEFLOW NODE TRIGGERED node:AND - Split Flow - Three concurent<br>
Processes[id=6]<br>
<br>
AFTER RULEFLOW NODE TRIGGERED node:Start Conveyor 2[id=5]<br>
<br>
AFTER RULEFLOW NODE TRIGGERED node:AND - Split Flow - Two concurent<br>
Processes[id=3]<br>
<br>
AFTER RULEFLOW NODE TRIGGERED node:Start[id=1]<br>
<br>
AFTER RULEFLOW STARTED<br>
<font color="#888888"><br>
--<br>
View this message in context: <a href="http://n3.nabble.com/DROOLS-Flow-as-a-Manufacturing-process-execution-engine-Noob-questions-about-events-and-concurrency-tp706102p706102.html" target="_blank">http://n3.nabble.com/DROOLS-Flow-as-a-Manufacturing-process-execution-engine-Noob-questions-about-events-and-concurrency-tp706102p706102.html</a><br>

Sent from the Drools - User mailing list archive at Nabble.com.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</font></blockquote></div><br><br clear="all"><br>-- <br> - <a href="http://salaboy.wordpress.com">http://salaboy.wordpress.com</a><br> - <a href="http://www.jbug.com.ar">http://www.jbug.com.ar</a><br> - Salatino &quot;Salaboy&quot; Mauricio -<br>