Yes, that sounds perfect..
If you find that your processes are too similar you should evaluate treating all those differences using rules in order to just fire one single processes. But the only way to learn that is doing it in the way that you mention. Start simple, create a simple process for just one of the type of the files that you receive and then plug different work items based on the process that you want to apply to each type of file.

Just my two cents...

Greetings

On Tue, Aug 3, 2010 at 11:03 AM, Kenneth May <klcmay@gmail.com> wrote:
I am new to Drools, but am an experienced programmer.  I was hoping
somebody with some Drools Flow experience could advise on a good
approach for dealing with the following requirements:

1) A large number of XML files are received: perhaps one every few
seconds (or more frequently).  Each time a file is received I want to
process these according to a pre-defined business process.  For
example:
- Calling a web service using some data contained in the file to do a
calculation
- Writing to a database
- Copying the file to another directory
- Sending an email
- Logging progress

NB Some of the logic in the flow may vary depending on data within the
file which is being processed.

2) The business process may vary slightly depending on the nature of
the file being received.  For example I have four file types: A,B,C
&D.  I’d want to invoke 4 slightly different processes.  Each of these
may have slight variations depending on the contents of the file.

3) The business processes may be changed occasionally, but usually not
drastically.  This doesn’t need to be done dynamically.


I already have code which monitors a folder for new files.  With
drools, I’m just not sure what the best pattern is for how to deal
with this in an efficient manner.  I was thinking:

Each time a file is received:
- Do an initial parse to determine which business process to invoke,
each of these would be built as a separate drools flow
- Construct the knowledgebase, session etc
- Start the relevant flow

I’m pretty sure this isn’t the easiest or most efficient approach
though!  Any thoughts?

Thanks,

Ken

_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users



--
 - CTO @ http://www.plugtree.com 
 - MyJourney @ http://salaboy.wordpress.com
 - Co-Founder @ http://www.jbug.com.ar
 
 - Salatino "Salaboy" Mauricio -