Return-Path: Delivered-To: apmail-ofbiz-user-archive@www.apache.org Received: (qmail 89391 invoked from network); 29 Jul 2010 15:07:06 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 29 Jul 2010 15:07:06 -0000 Received: (qmail 60375 invoked by uid 500); 29 Jul 2010 15:07:05 -0000 Delivered-To: apmail-ofbiz-user-archive@ofbiz.apache.org Received: (qmail 60336 invoked by uid 500); 29 Jul 2010 15:07:04 -0000 Mailing-List: contact user-help@ofbiz.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@ofbiz.apache.org Delivered-To: mailing list user@ofbiz.apache.org Delivered-To: moderator for user@ofbiz.apache.org Received: (qmail 34566 invoked by uid 99); 29 Jul 2010 11:48:09 -0000 X-ASF-Spam-Status: No, hits=2.5 required=10.0 tests=MISSING_MIMEOLE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Date: 29 Jul 2010 13:47:41 +0200 From: admin@jotel.strefa.pl Sender: admin@jotel.strefa.pl Subject: =?UTF-8?q?Re:_Using_Drools_to_Help_with_Rules?= To: user@ofbiz.apache.org cc: BJ Freeman MIME-Version: 1.0 Content-Type: TEXT/plain; CHARSET=ISO-8859-2 Content-Transfer-Encoding: QUOTED-PRINTABLE X-ORIGINATE-IP: 83.10.198.146 IMPORTANCE: Normal X-MSMAIL-PRIORITY: Normal X-PRIORITY: 3 Organization: INTERIA.PL S.A. Message-Id: <20100729114741.BFC1B1C0009CB@mx5.st.interia.pl> X-Virus-Checked: Checked by ClamAV on apache.org =0AW dniu 2010-07-29 05:47, BJ Freeman pisze:=0A>=0A> My efforts have been = how to have a ui that a business person would =0A> understand, and generate= ECA and SECA to accomplish Thier logic. The =0A> top level of this would b= e when they generate a business plan, it sets =0A> up the rules on how the = business flow is done. This actually is base =0A> on compiler theory and so= me program that create web code for a =0A> particular type of web. I estim= ated to be about 1.5 man year.=0A>=0A>=0AI thought something similar, but n= ot 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 w= ant 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 approp= riate events. Ideally this event should not require to load into memeory wh= ole 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 w= hich makes sens when we have it already loaded into memory or SQL if we cha= nge only one line.=0A=0AThe best thing I was able to find is called functio= nal reactive programming and has some implementation for C#, Scala and func= tional languages. In languages which make possible to get AST of expression= s we can track dependencies on it or even translate it to SQL update. And D= SL is also an option. =0A=0AI tried Drools which does not seems to be best = solution as it does not track dependecies between rules (rule fire order mu= st be given), so it make possible to calculate order summary before calcula= te line summary.=0A=0AAnother thing is to make such a document logic extens= ible and replacable. But if each rule would have its name that would should= be easy.=0A=0AI could give more thoughts on it. Maybe some organization wo= uld be interested in sponsoring such a project =0A=0ABest regards,=0A Ma= rek Mosiewicz=0A http://www.jotel.com.pl=0A=0A