You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Sam Hamilton <sa...@sh81.com> on 2010/07/29 05:12:09 UTC

Using Drools to Help with Rules

Hi Guys,

I have been thinking about problems we are soon going to start facing in marketing our OFBiz website and some of them can be solved using a rules engine, this then spilled over into other departments once I had read through the Drools website and saw how powerful it could be once implemented inside OFBiz. 

I was thinking Drools http://jboss.org/drools/ as its ASL2 so we can have in trunk http://jboss.org/drools/downloads.html and also because of the GUI which could be plugged into OFBiz where ever we need rules - a few cool examples are here http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/drools-introduction/html/ch02.html#d0e166 and for the developers or data mining people using Birt etc they can use Eclipse. 

The uses I can think of right now are:
1. Sending emails to customers - similar to auto responders or triggered emails .
2. Stock reordering - allowing different stock to be treated differently depending on for example how fast its selling or out of which warehouse the most is shipped. 
3. Inserting marketing material into parcels - picking different customer segments and targeting them differently.
4. Shipping carrier upgrades / changes depending on either destination or price - like zappos do when they secretly upgrade customers to over night delivery.
5. Refunds to customers if something goes wrong (could automate some of the process) and then if its outside the rules it move to a human for review. 

The real aim is that I want to move the process of rule changing out of the programers hands and put them into technical business people so that we can make fast changes to the business all done by the business users. 

What does everyone else think?


Cheers
Sam


Re: Using Drools to Help with Rules

Posted by Marek Mosiewicz <ma...@jotel.com.pl>.
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 either 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 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.

If someone would be interested in sponsoring such a project I could give 
more thoughts on it.

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


Re: Using Drools to Help with Rules

Posted by BJ Freeman <bj...@free-man.net>.
sorry typo program=projectmgr


BJ Freeman sent the following on 7/28/2010 9:47 PM:
> something else to consider. the business man will use tools like open
> office.
> open office has support for Macros. openoffice basic(the preferred),
> python, Beanshell, and Javascript.
> Open office binaries are already in ofbiz.
> why not extend the openoffice basic for business rules.
> flesh out the ofbiz program manager for Drools Planner, Drools Flow,
> fusion.
>
>
> BJ Freeman sent the following on 7/28/2010 9:21 PM:
>> I agree ECA is basic Database
>> SCAS is based on a operation/service like create party.
>> what I guess I was not clear on is that in compiler implementation you
>> have source code that is then turn into the actual code that will be
>> used.
>> Tn this case, an organization create business plan, which is quite
>> detailed.
>> then that is run though the "compiler" to create businesses flow in
>> project manger(which gives a visual), services and SCAS to implement.
>>
>> when a rule is implements it needs to take into consideration the
>> resources it has available to implement it. Man power, Facilities,
>> Assets, etc.
>>
>> having another language that a Business person has to learn it not what
>> I consider business friendly.
>>
>> if we talk about Drool first talk about what it takes to integrate into
>> ofbiz. An analysis of the inner workings of Drool and how it meshes with
>> ofbiz model.
>>
>> Brett Palmer sent the following on 7/28/2010 9:00 PM:
>>> I'm working on a non-ofbiz project right now where they are considering
>>> replacing the commercial rules engine solution with something like
>>> drools.
>>> Drools looks like a solid rules engine. They have their own domain
>>> specific
>>> language (DSL) which makes the rules easy to develop and follow. The
>>> also
>>> handled nested rules very effectively.
>>>
>>> I like ECA and SECA as well but I have used them more like database
>>> triggers
>>> and not a method for implementing complicated rules and workflow, but I
>>> could be wrong on this subject.
>>>
>>> Drools appears to be licensed appropriately for ofbiz. I would be in
>>> favor
>>> of drools rules engine integration implementation.
>>>
>>>
>>> Brett
>>>
>>> On Wed, Jul 28, 2010 at 9:47 PM, BJ Freeman<bj...@free-man.net> wrote:
>>>
>>>> ofbiz has, though not implemented well, a rules engine as well as a
>>>> workeffort and event(ECA, SECA, controller events) Model. the Project
>>>> management also lends itself to rules.
>>>>
>>>> I would suggest we work out a model rules engine that works around
>>>> the way
>>>> ofbiz works. That was the short comings of the other rules engines
>>>> was the
>>>> integration into the ofbiz model.
>>>>
>>>>
>>>> Maybe doing a review of rule engines in ofbiz now and why they did
>>>> not get
>>>> implemented would be a good exercise.
>>>>
>>>> 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.
>>>>
>>>>
>>>>
>>>> Sam Hamilton sent the following on 7/28/2010 8:12 PM:
>>>>
>>>> Hi Guys,
>>>>>
>>>>> I have been thinking about problems we are soon going to start
>>>>> facing in
>>>>> marketing our OFBiz website and some of them can be solved using a
>>>>> rules
>>>>> engine, this then spilled over into other departments once I had read
>>>>> through the Drools website and saw how powerful it could be once
>>>>> implemented
>>>>> inside OFBiz.
>>>>>
>>>>> I was thinking Drools http://jboss.org/drools/ as its ASL2 so we can
>>>>> have
>>>>> in trunk http://jboss.org/drools/downloads.html and also because of
>>>>> the
>>>>> GUI which could be plugged into OFBiz where ever we need rules - a
>>>>> few cool
>>>>> examples are here
>>>>> http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/drools-introduction/html/ch02.html#d0e166and
>>>>>
>>>>> for the developers or data mining people using Birt etc they can use
>>>>> Eclipse.
>>>>>
>>>>> The uses I can think of right now are:
>>>>> 1. Sending emails to customers - similar to auto responders or
>>>>> triggered
>>>>> emails .
>>>>> 2. Stock reordering - allowing different stock to be treated
>>>>> differently
>>>>> depending on for example how fast its selling or out of which
>>>>> warehouse the
>>>>> most is shipped.
>>>>> 3. Inserting marketing material into parcels - picking different
>>>>> customer
>>>>> segments and targeting them differently.
>>>>> 4. Shipping carrier upgrades / changes depending on either
>>>>> destination or
>>>>> price - like zappos do when they secretly upgrade customers to over
>>>>> night
>>>>> delivery.
>>>>> 5. Refunds to customers if something goes wrong (could automate
>>>>> some of
>>>>> the process) and then if its outside the rules it move to a human for
>>>>> review.
>>>>>
>>>>> The real aim is that I want to move the process of rule changing
>>>>> out of
>>>>> the programers hands and put them into technical business people so
>>>>> that we
>>>>> can make fast changes to the business all done by the business users.
>>>>>
>>>>> What does everyone else think?
>>>>>
>>>>>
>>>>> Cheers
>>>>> Sam
>>>>>
>>>>>
>>>>>
>>>
>>
>

Re: Using Drools to Help with Rules

Posted by BJ Freeman <bj...@free-man.net>.
something else to consider. the business man will use tools like open 
office.
open office has support for Macros. openoffice basic(the preferred), 
python, Beanshell, and Javascript.
Open office binaries are already in ofbiz.
why not extend the openoffice basic for business rules.
flesh out the ofbiz program manager for Drools Planner, Drools Flow, fusion.


BJ Freeman sent the following on 7/28/2010 9:21 PM:
> I agree ECA is basic Database
> SCAS is based on a operation/service like create party.
> what I guess I was not clear on is that in compiler implementation you
> have source code that is then turn into the actual code that will be used.
> Tn this case, an organization create business plan, which is quite
> detailed.
> then that is run though the "compiler" to create businesses flow in
> project manger(which gives a visual), services and SCAS to implement.
>
> when a rule is implements it needs to take into consideration the
> resources it has available to implement it. Man power, Facilities,
> Assets, etc.
>
> having another language that a Business person has to learn it not what
> I consider business friendly.
>
> if we talk about Drool first talk about what it takes to integrate into
> ofbiz. An analysis of the inner workings of Drool and how it meshes with
> ofbiz model.
>
> Brett Palmer sent the following on 7/28/2010 9:00 PM:
>> I'm working on a non-ofbiz project right now where they are considering
>> replacing the commercial rules engine solution with something like
>> drools.
>> Drools looks like a solid rules engine. They have their own domain
>> specific
>> language (DSL) which makes the rules easy to develop and follow. The also
>> handled nested rules very effectively.
>>
>> I like ECA and SECA as well but I have used them more like database
>> triggers
>> and not a method for implementing complicated rules and workflow, but I
>> could be wrong on this subject.
>>
>> Drools appears to be licensed appropriately for ofbiz. I would be in
>> favor
>> of drools rules engine integration implementation.
>>
>>
>> Brett
>>
>> On Wed, Jul 28, 2010 at 9:47 PM, BJ Freeman<bj...@free-man.net> wrote:
>>
>>> ofbiz has, though not implemented well, a rules engine as well as a
>>> workeffort and event(ECA, SECA, controller events) Model. the Project
>>> management also lends itself to rules.
>>>
>>> I would suggest we work out a model rules engine that works around
>>> the way
>>> ofbiz works. That was the short comings of the other rules engines
>>> was the
>>> integration into the ofbiz model.
>>>
>>>
>>> Maybe doing a review of rule engines in ofbiz now and why they did
>>> not get
>>> implemented would be a good exercise.
>>>
>>> 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.
>>>
>>>
>>>
>>> Sam Hamilton sent the following on 7/28/2010 8:12 PM:
>>>
>>> Hi Guys,
>>>>
>>>> I have been thinking about problems we are soon going to start
>>>> facing in
>>>> marketing our OFBiz website and some of them can be solved using a
>>>> rules
>>>> engine, this then spilled over into other departments once I had read
>>>> through the Drools website and saw how powerful it could be once
>>>> implemented
>>>> inside OFBiz.
>>>>
>>>> I was thinking Drools http://jboss.org/drools/ as its ASL2 so we can
>>>> have
>>>> in trunk http://jboss.org/drools/downloads.html and also because of the
>>>> GUI which could be plugged into OFBiz where ever we need rules - a
>>>> few cool
>>>> examples are here
>>>> http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/drools-introduction/html/ch02.html#d0e166and
>>>> for the developers or data mining people using Birt etc they can use
>>>> Eclipse.
>>>>
>>>> The uses I can think of right now are:
>>>> 1. Sending emails to customers - similar to auto responders or
>>>> triggered
>>>> emails .
>>>> 2. Stock reordering - allowing different stock to be treated
>>>> differently
>>>> depending on for example how fast its selling or out of which
>>>> warehouse the
>>>> most is shipped.
>>>> 3. Inserting marketing material into parcels - picking different
>>>> customer
>>>> segments and targeting them differently.
>>>> 4. Shipping carrier upgrades / changes depending on either
>>>> destination or
>>>> price - like zappos do when they secretly upgrade customers to over
>>>> night
>>>> delivery.
>>>> 5. Refunds to customers if something goes wrong (could automate some of
>>>> the process) and then if its outside the rules it move to a human for
>>>> review.
>>>>
>>>> The real aim is that I want to move the process of rule changing out of
>>>> the programers hands and put them into technical business people so
>>>> that we
>>>> can make fast changes to the business all done by the business users.
>>>>
>>>> What does everyone else think?
>>>>
>>>>
>>>> Cheers
>>>> Sam
>>>>
>>>>
>>>>
>>
>

Re: Using Drools to Help with Rules

Posted by Jacques Le Roux <ja...@les7arts.com>.
From: "BJ Freeman" <bj...@free-man.net>
> UBL is more for the developer IMHO.

For designing yes, but not for developers only. In Agile method (XP, Scrum, etc) a representative of the business side is present as 
much as possible to share his knowledge and help (oops, I wrote hemp, typo ;o) the dev team...

> a Business plan is someone what like UBL but has some specific steps.
> It's focus is to define all resources, business conditions, relative to the business they will have or do have.
> The resources are focused on staffing, cash flow, for the first 5yhears.
> the business condition is where the rules come in. These would start with a setup of Agreements the business will use to deal with 
> customer, supplier, vendors, financial institutions (payment systems), and employees.

Agreed...

> you will note that Drools rely's on Neural Net analysis, this would be part of project mgr.
> http://en.wikipedia.org/wiki/Neural_network

Yes, statistics... (I come from the other side of IA: Symbolic http://en.wikipedia.org/wiki/Artificial_intelligence#Symbolic)

Jacques

> PERT
> http://en.wikipedia.org/wiki/Program_Evaluation_and_Review_Technique
> CPM
> http://en.wikipedia.org/wiki/Critical_path_method
> The Business rules would be run under this.
>
> Also not Drools is not Http based.
>
>
> Jacques Le Roux sent the following on 7/29/2010 12:22 AM:
>> From: "BJ Freeman" <bj...@free-man.net>
>>> I agree ECA is basic Database
>>> SCAS is based on a operation/service like create party.
>>> what I guess I was not clear on is that in compiler implementation you
>>> have source code that is then turn into the actual code
>>> that will be used.
>>> Tn this case, an organization create business plan, which is quite
>>> detailed.
>>> then that is run though the "compiler" to create businesses flow in
>>> project manger(which gives a visual), services and SCAS to
>>> implement.
>>>
>>> when a rule is implements it needs to take into consideration the
>>> resources it has available to implement it. Man power,
>>> Facilities, Assets, etc.
>>>
>>> having another language that a Business person has to learn it not
>>> what I consider business friendly.
>>
>> I agree, the Business persons should stay at the business level and
>> rather use "stories" to describe their needs
>> UBPL is appropriate https://cwiki.apache.org/confluence/x/OwBy
>> On the other hand it sounds difficult to create a generic enough UI...
>>
>> Jacques
>>
>>> if we talk about Drool first talk about what it takes to integrate
>>> into ofbiz. An analysis of the inner workings of Drool and how
>>> it meshes with ofbiz model.
>>>
>>> Brett Palmer sent the following on 7/28/2010 9:00 PM:
>>>> I'm working on a non-ofbiz project right now where they are considering
>>>> replacing the commercial rules engine solution with something like
>>>> drools.
>>>> Drools looks like a solid rules engine. They have their own domain
>>>> specific
>>>> language (DSL) which makes the rules easy to develop and follow. The
>>>> also
>>>> handled nested rules very effectively.
>>>>
>>>> I like ECA and SECA as well but I have used them more like database
>>>> triggers
>>>> and not a method for implementing complicated rules and workflow, but I
>>>> could be wrong on this subject.
>>>>
>>>> Drools appears to be licensed appropriately for ofbiz. I would be in
>>>> favor
>>>> of drools rules engine integration implementation.
>>>>
>>>>
>>>> Brett
>>>>
>>>> On Wed, Jul 28, 2010 at 9:47 PM, BJ Freeman<bj...@free-man.net> wrote:
>>>>
>>>>> ofbiz has, though not implemented well, a rules engine as well as a
>>>>> workeffort and event(ECA, SECA, controller events) Model. the Project
>>>>> management also lends itself to rules.
>>>>>
>>>>> I would suggest we work out a model rules engine that works around
>>>>> the way
>>>>> ofbiz works. That was the short comings of the other rules engines
>>>>> was the
>>>>> integration into the ofbiz model.
>>>>>
>>>>>
>>>>> Maybe doing a review of rule engines in ofbiz now and why they did
>>>>> not get
>>>>> implemented would be a good exercise.
>>>>>
>>>>> 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.
>>>>>
>>>>>
>>>>>
>>>>> Sam Hamilton sent the following on 7/28/2010 8:12 PM:
>>>>>
>>>>> Hi Guys,
>>>>>>
>>>>>> I have been thinking about problems we are soon going to start
>>>>>> facing in
>>>>>> marketing our OFBiz website and some of them can be solved using a
>>>>>> rules
>>>>>> engine, this then spilled over into other departments once I had read
>>>>>> through the Drools website and saw how powerful it could be once
>>>>>> implemented
>>>>>> inside OFBiz.
>>>>>>
>>>>>> I was thinking Drools http://jboss.org/drools/ as its ASL2 so we
>>>>>> can have
>>>>>> in trunk http://jboss.org/drools/downloads.html and also because of
>>>>>> the
>>>>>> GUI which could be plugged into OFBiz where ever we need rules - a
>>>>>> few cool
>>>>>> examples are here
>>>>>> http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/drools-introduction/html/ch02.html#d0e166and
>>>>>> for the developers or
>>>>>> data mining people using Birt etc they can use
>>>>>> Eclipse.
>>>>>>
>>>>>> The uses I can think of right now are:
>>>>>> 1. Sending emails to customers - similar to auto responders or
>>>>>> triggered
>>>>>> emails .
>>>>>> 2. Stock reordering - allowing different stock to be treated
>>>>>> differently
>>>>>> depending on for example how fast its selling or out of which
>>>>>> warehouse the
>>>>>> most is shipped.
>>>>>> 3. Inserting marketing material into parcels - picking different
>>>>>> customer
>>>>>> segments and targeting them differently.
>>>>>> 4. Shipping carrier upgrades / changes depending on either
>>>>>> destination or
>>>>>> price - like zappos do when they secretly upgrade customers to over
>>>>>> night
>>>>>> delivery.
>>>>>> 5. Refunds to customers if something goes wrong (could automate
>>>>>> some of
>>>>>> the process) and then if its outside the rules it move to a human for
>>>>>> review.
>>>>>>
>>>>>> The real aim is that I want to move the process of rule changing
>>>>>> out of
>>>>>> the programers hands and put them into technical business people so
>>>>>> that we
>>>>>> can make fast changes to the business all done by the business users.
>>>>>>
>>>>>> What does everyone else think?
>>>>>>
>>>>>>
>>>>>> Cheers
>>>>>> Sam
>>>>>>
>>>>>>
>>>>>>
>>>>
>>>
>>
>>
>>
> 



Re: Using Drools to Help with Rules

Posted by BJ Freeman <bj...@free-man.net>.
UBL is more for the developer IMHO.
a Business plan is someone what like UBL but has some specific steps.
It's focus is to define all resources, business conditions, relative to 
the business they will have or do have.
The resources are focused on staffing, cash flow, for the first 5yhears.
the business condition is where the rules come in. These would start 
with a setup of Agreements the business will use to deal with customer, 
supplier, vendors, financial institutions (payment systems), and employees.

you will note that Drools rely's on Neural Net analysis, this would be 
part of project mgr.
http://en.wikipedia.org/wiki/Neural_network
PERT
http://en.wikipedia.org/wiki/Program_Evaluation_and_Review_Technique
CPM
http://en.wikipedia.org/wiki/Critical_path_method
The Business rules would be run under this.

Also not Drools is not Http based.


Jacques Le Roux sent the following on 7/29/2010 12:22 AM:
> From: "BJ Freeman" <bj...@free-man.net>
>> I agree ECA is basic Database
>> SCAS is based on a operation/service like create party.
>> what I guess I was not clear on is that in compiler implementation you
>> have source code that is then turn into the actual code
>> that will be used.
>> Tn this case, an organization create business plan, which is quite
>> detailed.
>> then that is run though the "compiler" to create businesses flow in
>> project manger(which gives a visual), services and SCAS to
>> implement.
>>
>> when a rule is implements it needs to take into consideration the
>> resources it has available to implement it. Man power,
>> Facilities, Assets, etc.
>>
>> having another language that a Business person has to learn it not
>> what I consider business friendly.
>
> I agree, the Business persons should stay at the business level and
> rather use "stories" to describe their needs
> UBPL is appropriate https://cwiki.apache.org/confluence/x/OwBy
> On the other hand it sounds difficult to create a generic enough UI...
>
> Jacques
>
>> if we talk about Drool first talk about what it takes to integrate
>> into ofbiz. An analysis of the inner workings of Drool and how
>> it meshes with ofbiz model.
>>
>> Brett Palmer sent the following on 7/28/2010 9:00 PM:
>>> I'm working on a non-ofbiz project right now where they are considering
>>> replacing the commercial rules engine solution with something like
>>> drools.
>>> Drools looks like a solid rules engine. They have their own domain
>>> specific
>>> language (DSL) which makes the rules easy to develop and follow. The
>>> also
>>> handled nested rules very effectively.
>>>
>>> I like ECA and SECA as well but I have used them more like database
>>> triggers
>>> and not a method for implementing complicated rules and workflow, but I
>>> could be wrong on this subject.
>>>
>>> Drools appears to be licensed appropriately for ofbiz. I would be in
>>> favor
>>> of drools rules engine integration implementation.
>>>
>>>
>>> Brett
>>>
>>> On Wed, Jul 28, 2010 at 9:47 PM, BJ Freeman<bj...@free-man.net> wrote:
>>>
>>>> ofbiz has, though not implemented well, a rules engine as well as a
>>>> workeffort and event(ECA, SECA, controller events) Model. the Project
>>>> management also lends itself to rules.
>>>>
>>>> I would suggest we work out a model rules engine that works around
>>>> the way
>>>> ofbiz works. That was the short comings of the other rules engines
>>>> was the
>>>> integration into the ofbiz model.
>>>>
>>>>
>>>> Maybe doing a review of rule engines in ofbiz now and why they did
>>>> not get
>>>> implemented would be a good exercise.
>>>>
>>>> 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.
>>>>
>>>>
>>>>
>>>> Sam Hamilton sent the following on 7/28/2010 8:12 PM:
>>>>
>>>> Hi Guys,
>>>>>
>>>>> I have been thinking about problems we are soon going to start
>>>>> facing in
>>>>> marketing our OFBiz website and some of them can be solved using a
>>>>> rules
>>>>> engine, this then spilled over into other departments once I had read
>>>>> through the Drools website and saw how powerful it could be once
>>>>> implemented
>>>>> inside OFBiz.
>>>>>
>>>>> I was thinking Drools http://jboss.org/drools/ as its ASL2 so we
>>>>> can have
>>>>> in trunk http://jboss.org/drools/downloads.html and also because of
>>>>> the
>>>>> GUI which could be plugged into OFBiz where ever we need rules - a
>>>>> few cool
>>>>> examples are here
>>>>> http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/drools-introduction/html/ch02.html#d0e166and
>>>>> for the developers or
>>>>> data mining people using Birt etc they can use
>>>>> Eclipse.
>>>>>
>>>>> The uses I can think of right now are:
>>>>> 1. Sending emails to customers - similar to auto responders or
>>>>> triggered
>>>>> emails .
>>>>> 2. Stock reordering - allowing different stock to be treated
>>>>> differently
>>>>> depending on for example how fast its selling or out of which
>>>>> warehouse the
>>>>> most is shipped.
>>>>> 3. Inserting marketing material into parcels - picking different
>>>>> customer
>>>>> segments and targeting them differently.
>>>>> 4. Shipping carrier upgrades / changes depending on either
>>>>> destination or
>>>>> price - like zappos do when they secretly upgrade customers to over
>>>>> night
>>>>> delivery.
>>>>> 5. Refunds to customers if something goes wrong (could automate
>>>>> some of
>>>>> the process) and then if its outside the rules it move to a human for
>>>>> review.
>>>>>
>>>>> The real aim is that I want to move the process of rule changing
>>>>> out of
>>>>> the programers hands and put them into technical business people so
>>>>> that we
>>>>> can make fast changes to the business all done by the business users.
>>>>>
>>>>> What does everyone else think?
>>>>>
>>>>>
>>>>> Cheers
>>>>> Sam
>>>>>
>>>>>
>>>>>
>>>
>>
>
>
>

Re: Using Drools to Help with Rules

Posted by Jacques Le Roux <ja...@les7arts.com>.
From: "BJ Freeman" <bj...@free-man.net>
>I agree ECA is basic Database
> SCAS is based on a operation/service like create party.
> what I guess I was not clear on is that in compiler implementation you have source code that is then turn into the actual code
> that will be used.
> Tn this case, an organization create business plan, which is quite detailed.
> then that is run though the "compiler" to create businesses flow in project manger(which gives a visual), services and SCAS to
> implement.
>
> when a rule is implements it needs to take into consideration the resources it has available to implement it. Man power,
> Facilities, Assets, etc.
>
> having another language that a Business person has to learn it not what I consider business friendly.

I agree, the Business persons should stay at the business level and rather use "stories" to describe their needs
UBPL is appropriate https://cwiki.apache.org/confluence/x/OwBy
On the other hand it sounds difficult to create a generic enough UI...

Jacques

> if we talk about Drool first talk about what it takes to integrate into ofbiz. An analysis of the inner workings of Drool and how
> it meshes with ofbiz model.
>
> Brett Palmer sent the following on 7/28/2010 9:00 PM:
>> I'm working on a non-ofbiz project right now where they are considering
>> replacing the commercial rules engine solution with something like drools.
>> Drools looks like a solid rules engine.  They have their own domain specific
>> language (DSL) which makes the rules easy to develop and follow.  The also
>> handled nested rules very effectively.
>>
>> I like ECA and SECA as well but I have used them more like database triggers
>> and not a method for implementing complicated rules and workflow, but I
>> could be wrong on this subject.
>>
>> Drools appears to be licensed appropriately for ofbiz.  I would be in favor
>> of drools rules engine integration implementation.
>>
>>
>> Brett
>>
>> On Wed, Jul 28, 2010 at 9:47 PM, BJ Freeman<bj...@free-man.net>  wrote:
>>
>>> ofbiz has, though not implemented well, a rules engine as well as a
>>> workeffort and event(ECA, SECA, controller events) Model. the Project
>>> management also lends itself to rules.
>>>
>>> I would suggest we work out a model rules engine that works around the way
>>> ofbiz works. That was the short comings of the other rules engines was the
>>> integration into the ofbiz model.
>>>
>>>
>>> Maybe doing a review of rule engines in ofbiz now and why they did not get
>>> implemented would be a good exercise.
>>>
>>> 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.
>>>
>>>
>>>
>>> Sam Hamilton sent the following on 7/28/2010 8:12 PM:
>>>
>>>   Hi Guys,
>>>>
>>>> I have been thinking about problems we are soon going to start facing in
>>>> marketing our OFBiz website and some of them can be solved using a rules
>>>> engine, this then spilled over into other departments once I had read
>>>> through the Drools website and saw how powerful it could be once implemented
>>>> inside OFBiz.
>>>>
>>>> I was thinking Drools http://jboss.org/drools/ as its ASL2 so we can have
>>>> in trunk http://jboss.org/drools/downloads.html and also because of the
>>>> GUI which could be plugged into OFBiz where ever we need rules - a few cool
>>>> examples are here
>>>> http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/drools-introduction/html/ch02.html#d0e166and for the developers or
>>>> data mining people using Birt etc they can use
>>>> Eclipse.
>>>>
>>>> The uses I can think of right now are:
>>>> 1. Sending emails to customers - similar to auto responders or triggered
>>>> emails .
>>>> 2. Stock reordering - allowing different stock to be treated differently
>>>> depending on for example how fast its selling or out of which warehouse the
>>>> most is shipped.
>>>> 3. Inserting marketing material into parcels - picking different customer
>>>> segments and targeting them differently.
>>>> 4. Shipping carrier upgrades / changes depending on either destination or
>>>> price - like zappos do when they secretly upgrade customers to over night
>>>> delivery.
>>>> 5. Refunds to customers if something goes wrong (could automate some of
>>>> the process) and then if its outside the rules it move to a human for
>>>> review.
>>>>
>>>> The real aim is that I want to move the process of rule changing out of
>>>> the programers hands and put them into technical business people so that we
>>>> can make fast changes to the business all done by the business users.
>>>>
>>>> What does everyone else think?
>>>>
>>>>
>>>> Cheers
>>>> Sam
>>>>
>>>>
>>>>
>>
>



Re: Using Drools to Help with Rules

Posted by BJ Freeman <bj...@free-man.net>.
I agree ECA is basic Database
SCAS is based on a operation/service like create party.
what I guess I was not clear on is that in compiler implementation you 
have source code that is then turn into the actual code that will be used.
Tn this case, an organization create business plan, which is quite detailed.
then that is run though the "compiler" to create businesses flow in 
project manger(which gives a visual), services and SCAS to implement.

when a rule is implements it needs to take into consideration the 
resources it has available to implement it. Man power, Facilities, 
Assets, etc.

having another language that a Business person has to learn it not what 
I consider business friendly.

if we talk about Drool first talk about what it takes to integrate into 
ofbiz. An analysis of the inner workings of Drool and how it meshes with 
ofbiz model.

Brett Palmer sent the following on 7/28/2010 9:00 PM:
> I'm working on a non-ofbiz project right now where they are considering
> replacing the commercial rules engine solution with something like drools.
> Drools looks like a solid rules engine.  They have their own domain specific
> language (DSL) which makes the rules easy to develop and follow.  The also
> handled nested rules very effectively.
>
> I like ECA and SECA as well but I have used them more like database triggers
> and not a method for implementing complicated rules and workflow, but I
> could be wrong on this subject.
>
> Drools appears to be licensed appropriately for ofbiz.  I would be in favor
> of drools rules engine integration implementation.
>
>
> Brett
>
> On Wed, Jul 28, 2010 at 9:47 PM, BJ Freeman<bj...@free-man.net>  wrote:
>
>> ofbiz has, though not implemented well, a rules engine as well as a
>> workeffort and event(ECA, SECA, controller events) Model. the Project
>> management also lends itself to rules.
>>
>> I would suggest we work out a model rules engine that works around the way
>> ofbiz works. That was the short comings of the other rules engines was the
>> integration into the ofbiz model.
>>
>>
>> Maybe doing a review of rule engines in ofbiz now and why they did not get
>> implemented would be a good exercise.
>>
>> 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.
>>
>>
>>
>> Sam Hamilton sent the following on 7/28/2010 8:12 PM:
>>
>>   Hi Guys,
>>>
>>> I have been thinking about problems we are soon going to start facing in
>>> marketing our OFBiz website and some of them can be solved using a rules
>>> engine, this then spilled over into other departments once I had read
>>> through the Drools website and saw how powerful it could be once implemented
>>> inside OFBiz.
>>>
>>> I was thinking Drools http://jboss.org/drools/ as its ASL2 so we can have
>>> in trunk http://jboss.org/drools/downloads.html and also because of the
>>> GUI which could be plugged into OFBiz where ever we need rules - a few cool
>>> examples are here
>>> http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/drools-introduction/html/ch02.html#d0e166and for the developers or data mining people using Birt etc they can use
>>> Eclipse.
>>>
>>> The uses I can think of right now are:
>>> 1. Sending emails to customers - similar to auto responders or triggered
>>> emails .
>>> 2. Stock reordering - allowing different stock to be treated differently
>>> depending on for example how fast its selling or out of which warehouse the
>>> most is shipped.
>>> 3. Inserting marketing material into parcels - picking different customer
>>> segments and targeting them differently.
>>> 4. Shipping carrier upgrades / changes depending on either destination or
>>> price - like zappos do when they secretly upgrade customers to over night
>>> delivery.
>>> 5. Refunds to customers if something goes wrong (could automate some of
>>> the process) and then if its outside the rules it move to a human for
>>> review.
>>>
>>> The real aim is that I want to move the process of rule changing out of
>>> the programers hands and put them into technical business people so that we
>>> can make fast changes to the business all done by the business users.
>>>
>>> What does everyone else think?
>>>
>>>
>>> Cheers
>>> Sam
>>>
>>>
>>>
>

Re: Using Drools to Help with Rules

Posted by Brett Palmer <br...@gmail.com>.
I'm working on a non-ofbiz project right now where they are considering
replacing the commercial rules engine solution with something like drools.
Drools looks like a solid rules engine.  They have their own domain specific
language (DSL) which makes the rules easy to develop and follow.  The also
handled nested rules very effectively.

I like ECA and SECA as well but I have used them more like database triggers
and not a method for implementing complicated rules and workflow, but I
could be wrong on this subject.

Drools appears to be licensed appropriately for ofbiz.  I would be in favor
of drools rules engine integration implementation.


Brett

On Wed, Jul 28, 2010 at 9:47 PM, BJ Freeman <bj...@free-man.net> wrote:

> ofbiz has, though not implemented well, a rules engine as well as a
> workeffort and event(ECA, SECA, controller events) Model. the Project
> management also lends itself to rules.
>
> I would suggest we work out a model rules engine that works around the way
> ofbiz works. That was the short comings of the other rules engines was the
> integration into the ofbiz model.
>
>
> Maybe doing a review of rule engines in ofbiz now and why they did not get
> implemented would be a good exercise.
>
> 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.
>
>
>
> Sam Hamilton sent the following on 7/28/2010 8:12 PM:
>
>  Hi Guys,
>>
>> I have been thinking about problems we are soon going to start facing in
>> marketing our OFBiz website and some of them can be solved using a rules
>> engine, this then spilled over into other departments once I had read
>> through the Drools website and saw how powerful it could be once implemented
>> inside OFBiz.
>>
>> I was thinking Drools http://jboss.org/drools/ as its ASL2 so we can have
>> in trunk http://jboss.org/drools/downloads.html and also because of the
>> GUI which could be plugged into OFBiz where ever we need rules - a few cool
>> examples are here
>> http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/drools-introduction/html/ch02.html#d0e166and for the developers or data mining people using Birt etc they can use
>> Eclipse.
>>
>> The uses I can think of right now are:
>> 1. Sending emails to customers - similar to auto responders or triggered
>> emails .
>> 2. Stock reordering - allowing different stock to be treated differently
>> depending on for example how fast its selling or out of which warehouse the
>> most is shipped.
>> 3. Inserting marketing material into parcels - picking different customer
>> segments and targeting them differently.
>> 4. Shipping carrier upgrades / changes depending on either destination or
>> price - like zappos do when they secretly upgrade customers to over night
>> delivery.
>> 5. Refunds to customers if something goes wrong (could automate some of
>> the process) and then if its outside the rules it move to a human for
>> review.
>>
>> The real aim is that I want to move the process of rule changing out of
>> the programers hands and put them into technical business people so that we
>> can make fast changes to the business all done by the business users.
>>
>> What does everyone else think?
>>
>>
>> Cheers
>> Sam
>>
>>
>>

Re: Using Drools to Help with Rules

Posted by BJ Freeman <bj...@free-man.net>.
ofbiz has, though not implemented well, a rules engine as well as a 
workeffort and event(ECA, SECA, controller events) Model. the Project 
management also lends itself to rules.

I would suggest we work out a model rules engine that works around the 
way ofbiz works. That was the short comings of the other rules engines 
was the integration into the ofbiz model.


Maybe doing a review of rule engines in ofbiz now and why they did not 
get implemented would be a good exercise.

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.



Sam Hamilton sent the following on 7/28/2010 8:12 PM:
> Hi Guys,
>
> I have been thinking about problems we are soon going to start facing in marketing our OFBiz website and some of them can be solved using a rules engine, this then spilled over into other departments once I had read through the Drools website and saw how powerful it could be once implemented inside OFBiz.
>
> I was thinking Drools http://jboss.org/drools/ as its ASL2 so we can have in trunk http://jboss.org/drools/downloads.html and also because of the GUI which could be plugged into OFBiz where ever we need rules - a few cool examples are here http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/drools-introduction/html/ch02.html#d0e166 and for the developers or data mining people using Birt etc they can use Eclipse.
>
> The uses I can think of right now are:
> 1. Sending emails to customers - similar to auto responders or triggered emails .
> 2. Stock reordering - allowing different stock to be treated differently depending on for example how fast its selling or out of which warehouse the most is shipped.
> 3. Inserting marketing material into parcels - picking different customer segments and targeting them differently.
> 4. Shipping carrier upgrades / changes depending on either destination or price - like zappos do when they secretly upgrade customers to over night delivery.
> 5. Refunds to customers if something goes wrong (could automate some of the process) and then if its outside the rules it move to a human for review.
>
> The real aim is that I want to move the process of rule changing out of the programers hands and put them into technical business people so that we can make fast changes to the business all done by the business users.
>
> What does everyone else think?
>
>
> Cheers
> Sam
>
>

Re: Using Drools to Help with Rules

Posted by Adrian Crum <ad...@yahoo.com>.
That sounds wonderful.

-Adrian

--- On Wed, 7/28/10, Sam Hamilton <sa...@sh81.com> wrote:

> From: Sam Hamilton <sa...@sh81.com>
> Subject: Using Drools to Help with Rules
> To: "user" <us...@ofbiz.apache.org>
> Date: Wednesday, July 28, 2010, 8:12 PM
> Hi Guys,
> 
> I have been thinking about problems we are soon going to
> start facing in marketing our OFBiz website and some of them
> can be solved using a rules engine, this then spilled over
> into other departments once I had read through the Drools
> website and saw how powerful it could be once implemented
> inside OFBiz. 
> 
> I was thinking Drools http://jboss.org/drools/ as its ASL2 so
> we can have in trunk http://jboss.org/drools/downloads.html and also because
> of the GUI which could be plugged into OFBiz where ever we
> need rules - a few cool examples are here http://downloads.jboss.com/drools/docs/5.0.1.26597.FINAL/drools-introduction/html/ch02.html#d0e166
> and for the developers or data mining people using Birt etc
> they can use Eclipse. 
> 
> The uses I can think of right now are:
> 1. Sending emails to customers - similar to auto responders
> or triggered emails .
> 2. Stock reordering - allowing different stock to be
> treated differently depending on for example how fast its
> selling or out of which warehouse the most is shipped. 
> 3. Inserting marketing material into parcels - picking
> different customer segments and targeting them differently.
> 4. Shipping carrier upgrades / changes depending on either
> destination or price - like zappos do when they secretly
> upgrade customers to over night delivery.
> 5. Refunds to customers if something goes wrong (could
> automate some of the process) and then if its outside the
> rules it move to a human for review. 
> 
> The real aim is that I want to move the process of rule
> changing out of the programers hands and put them into
> technical business people so that we can make fast changes
> to the business all done by the business users. 
> 
> What does everyone else think?
> 
> 
> Cheers
> Sam
> 
>