Re: [rules-users] Drools5 in tomcat 5
by Rubén Marrero
thanks a lot!
I'm trying to setup a decision service, _without_ having to code in java.
I'm kind of swamped at the moment in other stuff but will get back to this ASAP and report back.
Thanks again,
Rubén
De: "Jervisliu" <jliu(a)redhat.com>
Para: "Rules Users List" <rules-users(a)lists.jboss.org>
Enviados: Lunes, 17 de Mayo 2010 1:25:32
Asunto: Re: [rules-users] Drools5 in tomcat 5
Examples below shows how to use drools Camel integration. With Camel
integration, you can host drools rule engine as a Camel service. The
service can be based on Web services, REST, JMS or whatever capabilities
Camel offers.
http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-pipeline...
You can also use Drools pipeline to expose a drools rule engine as
service. For example, example below is exposing Drools through JMS:
http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-pipeline...
If you do a google search, you can also find some nice docs on how to
use drools-pipeline to expose drools engine as web services etc.
Hope this helps,
Jervis
Rubén Marrero wrote:
> Oh!
>
> I'm tempted to ask _why_ did anyone think that having a great web
> interface where you can create, test, store & version (I would think
> that at least exposing and securing) business tulers simply should
> fall short of _executing_ said rules? If Guvnor (or some other
> component, I'm learning here) could help me outsource my business
> rules, I could use in no matter what platform/ language. All the java
> coders could embed it and the rest of us could just execute it.
>
> But I won't ask :)
>
> Instead let me rephrase my original question. What's the best way to
> setup a remote server, that can receive my data, go through the rules,
> and return a response? That does not involve java coding? drools-server?
>
> Thanks,
> Rubén
> ------------------------------------------------------------------------
> *De: *"Esteban Aliverti" <esteban.aliverti(a)gmail.com>
> *Para: *"Rules Users List" <rules-users(a)lists.jboss.org>
> *CC: *"Diego Fabian Lopez Ruiz" <diego(a)lingo.mx>
> *Enviados: *Viernes, 14 de Mayo 2010 12:09:35
> *Asunto: *Re: [rules-users] Drools5 in tomcat 5
>
> Bad news! Guvnor doesn't execute the rules! It only acts as a
> repository! You can create your rules, test your rules and versioning
> them too, but if you want to execute them in a real business scenario,
> you have to code it. I know Drools already has some modules to do what
> you are trying to achieve, they are drools-pipeline (Which can use
> camel) or even drools-server (which is a simple servlet that executes
> commands). Unfortunately I'm not an expert on those modules, but you
> can always ask here for help.
>
> Best,
>
> 2010/5/14 Rubén Marrero <ruben(a)lingo.mx <mailto:ruben@lingo.mx>>
>
> The idea is to use Guvnor as a REST-accessible BRMS.
>
> We'll design, edit, test rules in guvnor, then execute them from
> the PHP web app in the background (with cURL or something ) or
> maybe we'll use proper webservices, as long as we can keep thing
> simple.
>
> Since we are already using tomcat 5 as our reporting endpoint,
> we'd like to just add the guvnor as a web app, as long as guvnor
> can execute the rules we setup in the nice web interface and
> respond with a json package to a REST json request.
>
> Guvnor _does_ execute rules, right? :-)
>
> I'll try removing the jars you mention and then report back.
>
> Thx,
> Rubén
> ------------------------------------------------------------------------
> *De: *"Esteban Aliverti" <esteban.aliverti(a)gmail.com
> <mailto:esteban.aliverti@gmail.com>>
> *Para: *"Rules Users List" <rules-users(a)lists.jboss.org
> <mailto:rules-users@lists.jboss.org>>
> *Enviados: *Viernes, 14 de Mayo 2010 6:49:53
> *Asunto: *Re: [rules-users] Drools5 in tomcat 5
>
>
> I didn't test Guvnor in Tomcat 5, but I did it in Tomcat 6. The
> only thing you need to do is to remove el-ri-xxx.jar and
> el-api-xxx.jar from Guvnors libraries (open the war file, browse
> to WEB-INF/lib and remove the files). This is because Tomcat
> already provides this libraries. That is the only thing I have to
> do when I want to use Guvnor deployed in a Tomcat.
> And remember that Drools is just a framework (a bunch of jars if
> you want), so you can use it everywhere: console app, desktop app,
> web app. Guvnor is a BRMS that you can use to create your rules,
> manage their life cycle and set as main repository (You can do
> more things too). It is important to make this distinction, maybe
> you just want to use drools expert/flow/fusion and not Guvnor.
>
> Best,
>
> 2010/5/14 Rubén Marrero <ruben(a)lingo.mx <mailto:ruben@lingo.mx>>
>
> Hi all:
>
> I want to add drools to a php application. Currently we are
> using Tomcat 5 to execute BIRT reports and works great.
>
> We want to keep using Tomcat (this version in particular) and
> just drop the Drools WAR so to disturb as little as possible
> our current setup.
>
> Is Tomcat 5 a supported platform to run Drools 5? any pointers
> to current docs?
>
> Thanks in advance,
> Rubén
>
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org <mailto:rules-users@lists.jboss.org>
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
>
>
> --
> XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
>
> Esteban Aliverti
>
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org <mailto:rules-users@lists.jboss.org>
> https://lists.jboss.org/mailman/listinfo/rules-users
>
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org <mailto:rules-users@lists.jboss.org>
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
>
>
> --
> XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
>
> Esteban Aliverti
>
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
> ------------------------------------------------------------------------
>
> _______________________________________________
> rules-users mailing list
> rules-users(a)lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
15 years, 11 months
CHR 2010: Call for Participation
by Peter Van Weert
CALL FOR PARTICIPATION
CHR 2010
7th International Workshop on Constraint Handling Rules
associated with ICLP 2010 (part of FLoC 2010)
Edinburgh, Scotland, 20 July 2010
http://dtai.cs.kuleuven.be/CHR/CHR2010/
HIGHLIGHTS
* newcomers' welcome to CHR tutorial by Thom Frühwirth
* invited talk on the JBoss Drools business rules platform by Mark Proctor
* invited talk by Matt Lilley of SecuritEase, a leading stock broking system
* introduction to CHRiSM, a CHR-based probabilistic formalism, by Jon Sneyers
* presentation of the six accepted papers + two demos
INTRODUCTION
The Constraint Handling Rules (CHR) language has become a major declarative
specification formalism and implementation language for constraint reasoning
algorithms and applications. Algorithms are often specified using inference
rules, rewrite rules, sequents, proof rules, or logical axioms that can be
directly written in CHR. Its clean semantics facilitates program design,
analysis, and transformation. See the CHR website for more information:
http://dtai.cs.kuleuven.be/CHR/
PROGRAM
The CHR 2010 workshop offers a very attractive and varied program. Next to our
accepted technical papers, we have two invited speakers: Mark Proctor from the
JBoss Drools project, a major open-source business rule platform, and Matt
Lilley from SecuritEase, a leading stock broking dealing and settlement system,
and one of the most prominent industry users of Prolog and CHR.
Other highlights are the first practical confluence checker for CHR, and
several application-oriented presentations, including two demos by students
from the University of Ulm on using CHR with a multi-touch interface: one for
automated music generation, and one aimed at providing long-term routing for
fully autonomous sailing boats (in cooperation with the Roboat project).
Because many FLoC attendants will be new to CHR, we included two additional
introductionary presentations: Thom Frühwirth will give a broad tutorial on CHR
in general, and Jon Sneyers will introduce the recent CHR-based probabilistic
formalism CHRiSM (also presented at the main ICLP conference).
The full workshop's program is available at:
http://dtai.cs.kuleuven.be/CHR/CHR2010/programme.shtml
REGISTRATION
Registration for the workshop can be done online at:
http://www.floc-conference.org/registration.html
Early registration ends 17 May.
ORGANIZATION
Program Committee:
* Sebastian Brand, NICTA and University of Melbourne, Australia
* Henning Christiansen, Roskilde University, Denmark
* Verónica Dahl, Simon Fraser University, Canada
* Leslie De Koninck, NICTA and University of Melbourne, Australia (co-chair)
* Thom Frühwirth, Ulm University, Germany
* Marco Gavanelli, University of Ferrara, Italy
* Rémy Haemmerlé, Universidad Politécnica de Madrid, Spain
* Maria-Chiara Meo, "Gabriele d'Annunzio" University, Italy
* Paolo Pilozzi, K.U.Leuven, Belgium
* Frank Raiser, Ulm University, Germany
* Peter Van Weert, K.U.Leuven, Belgium (co-chair)
* Jairson Vitorino, Federal University of Pernambuco, Brazil
* Armin Wolf, Fraunhofer FIRST, Germany
Workshop Coordinators:
Contact: chr2010(a)easychair.org
Peter Van Weert
Department of Computer Science, K.U.Leuven
Leuven, Belgium
http://people.cs.kuleuven.be/~peter.vanweert/
Leslie De Koninck
National ICT Australia, Victoria Research Laboratory
Dept of Computer Science and Software Engineering, University of Melbourne
Melbourne, Australia
15 years, 11 months
What project I should be looking to use
by Kishore Chintoju
Hi Guys,
We are incorporating rules engine into our project.
As part of this we will building a web based rules UI to be used by our
customers to create/edit rules (aka Guvnor, but not as generic and full
fledged) . All of the rules will be persisted to DB.
We have prototyped the getting the rules of of DB and invoking rules engine
on the loaded rules part, which was working.
Now I'm prototyping the create and persist rule to DB part.
I was looking through the *drools-compiler* and *drools-template *APIs to
see the classes I should be using to do this.
I have the following questions.
1. We have decided to save the rules into the DB as DRL, is this the
right approach
2. Which of *drools-compiler *and *drools-template *has the appropriate
API for creating a rule element in memory and parse it into DRL (to be
stored in DB),
1. Am I looking at the right projects for the job or should I be
looking somewhere else?
2. I'm looking through the api, but any pointers/articles which will
help me through will be appreciated.
Cheers
Kishore
15 years, 11 months
Re: [rules-users] Drools5 in tomcat 5
by Rubén Marrero
Oh!
I'm tempted to ask _why_ did anyone think that having a great web interface where you can create, test, store & version (I would think that at least exposing and securing) business tulers simply should fall short of _executing_ said rules? If Guvnor (or some other component, I'm learning here) could help me outsource my business rules, I could use in no matter what platform/ language. All the java coders could embed it and the rest of us could just execute it.
But I won't ask :)
Instead let me rephrase my original question. What's the best way to setup a remote server, that can receive my data, go through the rules, and return a response? That does not involve java coding? drools-server?
Thanks,
Rubén
De: "Esteban Aliverti" <esteban.aliverti(a)gmail.com>
Para: "Rules Users List" <rules-users(a)lists.jboss.org>
CC: "Diego Fabian Lopez Ruiz" <diego(a)lingo.mx>
Enviados: Viernes, 14 de Mayo 2010 12:09:35
Asunto: Re: [rules-users] Drools5 in tomcat 5
Bad news! Guvnor doesn't execute the rules! It only acts as a repository! You can create your rules, test your rules and versioning them too, but if you want to execute them in a real business scenario, you have to code it. I know Drools already has some modules to do what you are trying to achieve, they are drools-pipeline (Which can use camel) or even drools-server (which is a simple servlet that executes commands). Unfortunately I'm not an expert on those modules, but you can always ask here for help.
Best,
2010/5/14 Rubén Marrero < ruben(a)lingo.mx >
The idea is to use Guvnor as a REST-accessible BRMS.
We'll design, edit, test rules in guvnor, then execute them from the PHP web app in the background (with cURL or something ) or maybe we'll use proper webservices, as long as we can keep thing simple.
Since we are already using tomcat 5 as our reporting endpoint, we'd like to just add the guvnor as a web app, as long as guvnor can execute the rules we setup in the nice web interface and respond with a json package to a REST json request.
Guvnor _does_ execute rules, right? :-)
I'll try removing the jars you mention and then report back.
Thx,
Rubén
De: "Esteban Aliverti" < esteban.aliverti(a)gmail.com >
Para: "Rules Users List" < rules-users(a)lists.jboss.org >
Enviados: Viernes, 14 de Mayo 2010 6:49:53
Asunto: Re: [rules-users] Drools5 in tomcat 5
I didn't test Guvnor in Tomcat 5, but I did it in Tomcat 6. The only thing you need to do is to remove el-ri-xxx.jar and el-api-xxx.jar from Guvnors libraries (open the war file, browse to WEB-INF/lib and remove the files). This is because Tomcat already provides this libraries. That is the only thing I have to do when I want to use Guvnor deployed in a Tomcat.
And remember that Drools is just a framework (a bunch of jars if you want), so you can use it everywhere: console app, desktop app, web app. Guvnor is a BRMS that you can use to create your rules, manage their life cycle and set as main repository (You can do more things too). It is important to make this distinction, maybe you just want to use drools expert/flow/fusion and not Guvnor.
Best,
2010/5/14 Rubén Marrero < ruben(a)lingo.mx >
Hi all:
I want to add drools to a php application. Currently we are using Tomcat 5 to execute BIRT reports and works great.
We want to keep using Tomcat (this version in particular) and just drop the Drools WAR so to disturb as little as possible our current setup.
Is Tomcat 5 a supported platform to run Drools 5? any pointers to current docs?
Thanks in advance,
Rubén
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
--
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Esteban Aliverti
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
--
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Esteban Aliverti
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
15 years, 11 months
help in date time format
by Sudhir M
Hi,
My requirement is to compare two dates one a date object and the other
a date literal. In comparison it should also consider time. There is
format given for date literal (dd-mmm-yyy) but how can we add time to
it? I tried adding time it doesn't complain but seems to ignore the
time part in the date literal.
below is the example
Exam(name=="Math", examDate<="13-may-2010") this is my pattern.
tried
Exam(name=="Math", examDate<="15-may-2010 17:00:00") but time ignored
while executing.
Is there any format for DateTime?
Thanks,
sudhir.
15 years, 11 months
Reg : class cast error when use "from collect " key word
by dilip
Hi All,
I am getting the following eror when i use "from collect" key word. Help me to resolve this.Thanks in advance to all.
my rule is....
Rule "test"
when
$inputObj : QuotationSearchFormObject( extensions != null )
QuotationLineExt( $locFrmLabel:label == 'Location From' , value != null , $locFromValue : value ) from $inputObj.getExtensions()
i : ArrayList( size > 0 ) from collect ( QuotationLine( extensions != null ) from $totList);
then
System.out.println("success");
end
Error marked in red colour line.
java.lang.ClassCastException: org.drools.reteoo.CollectNode$CollectMemory cannot be cast to org.drools.reteoo.FromNode$FromMemory
at org.drools.reteoo.FromNode.assertLeftTuple(FromNode.java:93)
at org.drools.reteoo.CompositeLeftTupleSinkAdapter.doPropagateAssertLeftTuple(CompositeLeftTupleSinkAdapter.java:145)
at org.drools.reteoo.CompositeLeftTupleSinkAdapter.createAndPropagateAssertLeftTuple(CompositeLeftTupleSinkAdapter.java:57)
at org.drools.reteoo.LeftInputAdapterNode.assertObject(LeftInputAdapterNode.java:142)
Thanks
Dilip.
15 years, 11 months
Schedule Rules to Fire in Drools Expert
by andre.fonseca@mail.com
Hi all,
It's possible to schedule (and reschedule) rules to fire in Drools Expert?
As my understood the Agenda is a kind of TODO list right? Can I reorder the priority of that list so?
Could someone give-me and idea (a pseudo-code or something like that) to show that concept?
Thanks In Advance!
15 years, 11 months
Re: [rules-users] Drools5 in tomcat 5
by Rubén Marrero
The idea is to use Guvnor as a REST-accessible BRMS.
We'll design, edit, test rules in guvnor, then execute them from the PHP web app in the background (with cURL or something ) or maybe we'll use proper webservices, as long as we can keep thing simple.
Since we are already using tomcat 5 as our reporting endpoint, we'd like to just add the guvnor as a web app, as long as guvnor can execute the rules we setup in the nice web interface and respond with a json package to a REST json request.
Guvnor _does_ execute rules, right? :-)
I'll try removing the jars you mention and then report back.
Thx,
Rubén
De: "Esteban Aliverti" <esteban.aliverti(a)gmail.com>
Para: "Rules Users List" <rules-users(a)lists.jboss.org>
Enviados: Viernes, 14 de Mayo 2010 6:49:53
Asunto: Re: [rules-users] Drools5 in tomcat 5
I didn't test Guvnor in Tomcat 5, but I did it in Tomcat 6. The only thing you need to do is to remove el-ri-xxx.jar and el-api-xxx.jar from Guvnors libraries (open the war file, browse to WEB-INF/lib and remove the files). This is because Tomcat already provides this libraries. That is the only thing I have to do when I want to use Guvnor deployed in a Tomcat.
And remember that Drools is just a framework (a bunch of jars if you want), so you can use it everywhere: console app, desktop app, web app. Guvnor is a BRMS that you can use to create your rules, manage their life cycle and set as main repository (You can do more things too). It is important to make this distinction, maybe you just want to use drools expert/flow/fusion and not Guvnor.
Best,
2010/5/14 Rubén Marrero < ruben(a)lingo.mx >
Hi all:
I want to add drools to a php application. Currently we are using Tomcat 5 to execute BIRT reports and works great.
We want to keep using Tomcat (this version in particular) and just drop the Drools WAR so to disturb as little as possible our current setup.
Is Tomcat 5 a supported platform to run Drools 5? any pointers to current docs?
Thanks in advance,
Rubén
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
--
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Esteban Aliverti
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
15 years, 11 months
issue with 'forall'
by Michal Bali
Hi,
I have encountered the following problem with the latest Drools 5.1 SNAPSHOT
I've created a sample Drools project and replaced the Sample.drl with the
following:
--Sample.drl--------------------------------------
package com.sample
import com.sample.DroolsTest.Message;
rule "Hello World"
when
forall( Message( )
Message() )
then
System.out.println("executed");
end
--------------------------------------------
If I run the sample application like this everything is fine - "executed"
is printed. However, if I modify the main method and insert some additional
fact just before the message fact is inserted, like this:
--DroolsTest.java-----------------------------------
.....
ksession.insert(new Object());
ksession.insert(message);
.....
-----------------------------------------------------------
then the rule won't fire any more.
Please note that if you change the fact insertion order (first the message
then the Object) it will work as expected.
Is this a bug or am I missing something? I can file a JIRA if needed.
Thank you!
Best regards,
Michal
15 years, 11 months