ofbiz-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ad...@jotel.strefa.pl
Subject Re: Using Drools to Help with Rules
Date Thu, 29 Jul 2010 11:47:41 GMT

W dniu 2010-07-29 05:47, BJ Freeman pisze:
>
> My efforts have been how to have a ui that a business person would 
> understand, and generate ECA and SECA to accomplish Thier logic. The 
> top level of this would be when they generate a business plan, it sets 
> up the rules on how the business flow is done. This actually is base 
> on compiler theory and some program that create web code for a 
> particular type of web.  I estimated to be about 1.5 man year.
>
>
I thought something similar, but not connected directly to UI. There should be some kind of
stateful document business tier which should react to generic events (like drop line, change
field). Events could come from ui tier, but also from batch tier. E.g we want to create or
change order from XML source. Then it should take current db state of order (if it exists)
diff with target state and generate appropriate events. Ideally this event should not require
to load into memeory whole document tree. The best thing would be to have rules/expressions
which are automatically translabe either into java code or SQL. That for example would make
possible to decide if we want to summarize order via java code which makes sens when we have
it already loaded into memory or SQL if we change only one line.

The best thing I was able to find is called functional reactive programming and has some implementation
for C#, Scala and functional languages. In languages which make possible to get AST of expressions
we can track dependencies on it or even translate it to SQL update. And DSL is also an option.


I tried Drools which does not seems to be best solution as it does not track dependecies between
rules (rule fire order must be given), so it make possible to calculate order summary before
calculate line summary.

Another thing is to make such a document logic extensible and replacable. But if each rule
would have its name that would should be easy.

I could give more thoughts on it. Maybe some organization would be interested in sponsoring
such a project 

Best regards,
    Marek Mosiewicz
    http://www.jotel.com.pl



Mime
View raw message