Re: [rules-users] Moving from Jrules to Drools a couple of Issues

2010-05-27 Thread Mark Proctor
On 26/05/2010 09:56, paulnnosh wrote:
 Hi Chaps,

 We currently use Jrules 5 and are looking at our options going forward. We
 are going to evaluate Drools alongside some other products. So far I like
 the look of Drools but there are a couple of things that are puzzling me...

 - In our Jrules implementation our BOM/XOM exposes some of our application
 logic so that our rules can access application code and services to make
 decisions and updates where necessary. I can't see how this is possible in
 Drools.

Pojos just work out of the box, it's much simpler :) So any inserted 
object is a pojo and is a direct reference to the object the user 
inserted. Use globals (also simple pojos) for registering and accessing 
services.
 - Our ruleflows use decision tables to define which rules will run dependant
 upon the transaction type received. This makes assigning a rule to a single
 ruleflow group inappropriate as one rule could be used by many different
 transactions. Is it possible to create an ArrayList of rules and execute
 them one at a time via ruleflow action node?

JRules ruleflow and Drools ruleflow are very different. In JRules each 
ruleflow group is a separate knowledge base and executes statelessly. 
Where as RuleFlow in drools is for a single knowledge base and stateful 
sessions.

You can simulate the more traditional ilog way by using Drools Flow, and 
create a work item to execute some input vars against a stateless 
session. This way each branch can have it's own knowledge base and copy 
of relevant rules.

Mark
 Many Thanks






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


Re: [rules-users] Moving from Jrules to Drools a couple of Issues

2010-05-27 Thread paulnnosh

Thanks Mark, very helpful. 

I'm about to set up a Proof of concept so I'll try it out. Due to the
relatively complex nature of our ruleflows and the fact that many rules can
be used by many transaction types Drools Flow sounds like it will have to be
the way to go. I'm out about to dig out the flow manual;-)
-- 
View this message in context: 
http://drools-java-rules-engine.46999.n3.nabble.com/Moving-from-Jrules-to-Drools-a-couple-of-Issues-tp844379p847740.html
Sent from the Drools - User mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Moving from Jrules to Drools a couple of Issues

2010-05-27 Thread paulnnosh

I Just need clarification on the injection of POJOs to give access to
application services etc...

I understand the fact that POJOs inserted into the working memory are direct
references to the actual objects inserted by the calling application, that's
great. However, currently in Jrules (sorry to keep telling you what we have
already!) a number of our functions make regualr use of a large number of
our core application classes. To have to insert all of these each time a
ruleset is called would soon become unwieldy and I have concerns about the
amount of working memory that would be required. Is it possible to create a
reference to my application and initilise this at the start up of the server
so that these classes are available to my packages without having to load
them into WM each time?

Many Thanks


-- 
View this message in context: 
http://drools-java-rules-engine.46999.n3.nabble.com/Moving-from-Jrules-to-Drools-a-couple-of-Issues-tp844379p847769.html
Sent from the Drools - User mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Moving from Jrules to Drools a couple of Issues

2010-05-27 Thread Mark Proctor
On 27/05/2010 11:04, paulnnosh wrote:
 I Just need clarification on the injection of POJOs to give access to
 application services etc...

 I understand the fact that POJOs inserted into the working memory are direct
 references to the actual objects inserted by the calling application, that's
 great. However, currently in Jrules (sorry to keep telling you what we have
 already!) a number of our functions make regualr use of a large number of
 our core application classes. To have to insert all of these each time a
 ruleset is called would soon become unwieldy and I have concerns about the
 amount of working memory that would be required. Is it possible to create a
 reference to my application and initilise this at the start up of the server
 so that these classes are available to my packages without having to load
 them into WM each time?

Globals.

Mark
 Many Thanks





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


Re: [rules-users] Moving from Jrules to Drools a couple of Issues

2010-05-27 Thread Greg Barton
Pithy as usual, Mark. :)

Paul, you partially mention a way to go about it: dependency injection.

http://en.wikipedia.org/wiki/Dependency_injection

The best way to do that these days is with Spring using the Inversion of 
Control pattern:

http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/

http://static.springsource.org/spring/docs/3.0.x/spring-framework-reference/html/beans.html

--- On Thu, 5/27/10, Mark Proctor mproc...@codehaus.org wrote:

 From: Mark Proctor mproc...@codehaus.org
 Subject: Re: [rules-users] Moving from Jrules to Drools a couple of Issues
 To: rules-users@lists.jboss.org
 Date: Thursday, May 27, 2010, 5:31 AM
 On 27/05/2010 11:04, paulnnosh
 wrote:
  I Just need clarification on the injection of POJOs to
 give access to
  application services etc...
 
  I understand the fact that POJOs inserted into the
 working memory are direct
  references to the actual objects inserted by the
 calling application, that's
  great. However, currently in Jrules (sorry to keep
 telling you what we have
  already!) a number of our functions make regualr use
 of a large number of
  our core application classes. To have to insert all of
 these each time a
  ruleset is called would soon become unwieldy and I
 have concerns about the
  amount of working memory that would be required. Is it
 possible to create a
  reference to my application and initilise this at the
 start up of the server
  so that these classes are available to my packages
 without having to load
  them into WM each time?
     
 Globals.
 
 Mark
  Many Thanks
 
 
     
 
 
 ___
 rules-users mailing list
 rules-users@lists.jboss.org
 https://lists.jboss.org/mailman/listinfo/rules-users
 


  

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


[rules-users] Moving from Jrules to Drools a couple of Issues

2010-05-26 Thread paulnnosh

Hi Chaps,

We currently use Jrules 5 and are looking at our options going forward. We
are going to evaluate Drools alongside some other products. So far I like
the look of Drools but there are a couple of things that are puzzling me...

- In our Jrules implementation our BOM/XOM exposes some of our application
logic so that our rules can access application code and services to make
decisions and updates where necessary. I can't see how this is possible in
Drools.

- Our ruleflows use decision tables to define which rules will run dependant
upon the transaction type received. This makes assigning a rule to a single
ruleflow group inappropriate as one rule could be used by many different
transactions. Is it possible to create an ArrayList of rules and execute
them one at a time via ruleflow action node?

Many Thanks



-- 
View this message in context: 
http://drools-java-rules-engine.46999.n3.nabble.com/Moving-from-Jrules-to-Drools-a-couple-of-Issues-tp844379p844379.html
Sent from the Drools - User mailing list archive at Nabble.com.
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users