title: Rules engine or events processing
body: <p>I have a customer management system used by businesses to store customer data and some other info. I want my system to send an email to the user (business owner) in several cases like the following:</p>
  
  <ol>
  <li><p>If one week after the signup the user (business owner) did not enter customers to the system - send him an email reminding him to add customers. Make this a weekly/monthly reminder.</p></li>
  <li><p>If the user reaches a milestone (e.g. 100 customers in the system) send him a congratulation email, but don't do it if he reaches the same milestone again (e.g. by deletion and addition).</p></li>
  </ol>
  
  <p>Edit - 3. Send a "happy holiday" email a week before a holiday (giving this example mainly since it's the simplest one that illustrates dependence on a property of an <strong>event</strong>, not the user).</p>
  
  <p>I need a system which would allow easy addition of rules based on previous/future events (future events have a known date) and user properties. I read a little about <a href="http://thoughts.inphina.com/2010/04/15/event-processing-rule-engine/" rel="nofollow">rules engines and events processing</a> but still not really sure what class my problem belongs to.</p>
  
  <p>Would be great to hear about specific recommendations for rules\events processing modules I could use. I'm thinking either <a href="http://www.jboss.org/drools/" rel="nofollow">Drools</a> or <a href="http://esper.codehaus.org/" rel="nofollow">Esper</a> but both seem pretty complex and I want to be sure it's the right fit before investing time in adding them to my system.</p>
  
  <p>I'm using Java and Hibernate if it matters.</p>