[rules-users] DROOLS Flow as a Manufacturing process execution engine - Noob questions about events and concurrency

jeanjvr jeanjvr at live.co.za
Fri Apr 9 03:52:19 EDT 2010


Salaboy,

I put up a new simple diagram with red markers to show what I mean: 

http://i349.photobucket.com/albums/q388/shooter_za/loop.jpg

http://n3.nabble.com/file/n707815/loop.jpg 



1. Regarding concurrency. What I mean is that after I use an AND split node,
the flows going out from it will execute on their own paths at the same
time? I assume that DROOLS Flow achieves this in the engine with multiple
threads (in the background of the engine that we don't see)?


2. Regarding control loops. I mean here that according to the way I set up
the flow that a loop will be constructed in the logic with certain flows
executing multiple times. The motivation for this is that in manufacturing
more than one product is assembled in a run, and this is where the loops in
logic come from. I don't think I need a dedicated "for each" construct, but
I may be wrong. If you look at my DROOLS flow image, you'll see that I've
modeled three such "loops" into my flow and outlined one in the diagram
above. The compiler validates my flow as legal, I'm wondering if this is
really allowed in DROOLS.


3. Regarding the Events. In the diagram you can see I outlined an example of
two Events that are attached to an AND Join node. As I understand it, all
flows going into the AND Join node should be completed before it can
continue. Two of my flows here are Events. So in this example I want the one
"normal flow" to enter the AND Join node and at some later time when both
Events have fired I need the outgoing flow to continue.

When I run the process, it does not wait until the two Event nodes have
fired, it just executes until the AND Join node is encountered and the
overall process exists.

Jean




jeanjvr wrote:
> 
> 
> I attach a PNG image
> (http://i349.photobucket.com/albums/q388/shooter_za/jvr_test_flow.png) and
> a trimmed log of my flow just for interest sake at the end. 
> 
> My test Java app starts the flow in a new thread and allows me to trigger
> events in the flow with buttons (processInstance.signalEvent(String type,
> Object data)). If I use Drools in my project, the events would be
> generated by factory devices through an industrial protocol called OPC.
> 
> 
> Some noob questions:
> 
> 1. I need concurrent execution in my flow. I use Split nodes to do this.
> Is this the correct way to achieve concurrency?
> 
> 2. I need to construct control loops. Pieces of the flow that execute over
> and over until a constraint
> directs flow to an End node. I see no reason why loops cannot be done in
> DROOLS flow.
> 
> 3. My biggest problem at this time is that my flow executes, but "ignores"
> Event nodes connected to AND Join nodes. The work-flow then ends and my
> thread exits, although the End nodes in question are not reached according
> to the log.
> 
> I suppose the engine determines that no terminating End node can be
> reached and stops. I think that I maybe have an incorrect understanding of
> some aspect of the DROOLS work-flow engine.
> 
> The core idea is to let one or more flows reach an AND Join node - and
> then wait until all Event nodes attached to the AND Join node is
> triggered, allowing the flow to continue.
> 
> Other problems I will not list here now, as I believe I may be able to
> figure them out (variables, constraints). I just want to prove that Flow
> can be used.
> 
> 

-- 
View this message in context: http://n3.nabble.com/DROOLS-Flow-as-a-Manufacturing-process-execution-engine-Noob-questions-about-events-and-concurrency-tp706102p707815.html
Sent from the Drools - User mailing list archive at Nabble.com.



More information about the rules-users mailing list