DROOLS Negate Question
by mahmood lebbai
I need help to clarify the following
I had taken latest Guvnour 5.2.0 M2 version and use the sample pricing loan rules.
When i tried to use the "Negate" Meta data option and set it to true on first rule , i had got the following error.
Pricing loans] [ERR 102] Line 7:3 mismatched input 'income' in rule "Row 1 Pricing loans"
[Pricing loans] Line 16:0 unexpected exception at input 'rule'. Exception: java.util.EmptyStackException. Stack trace: java.util.EmptyStackException at java.util.Stack.peek(Stack.java:79) at java.util.Stack.pop(Stack.java:61) at org.drools.lang.ParserHelper.popParaphrases(ParserHelper.java:409) at org.drools.lang.ParserHelper.end(ParserHelper.java:723) at org.drools.lang.DRLParser.rule(DRLParser.java:915) at org.drools.lang.DRLParser.statement(DRLParser.java:248) at org.drools.lang.DRLParser.compilationUnit(DRLParser.java:143) at org.drools.compiler.DrlParser.compile(DrlParser.java:225) at org.drools.compiler.DrlParser.parse(DrlParser.java:71) at org.drools.compiler.DrlParser.parse(DrlParser.java:76) at
I have a similar requirement where in I need to write both negate with true and false within the same ruleset in guvnour. Please help me out how to achieve this.
Regards,
Mahmood
13 years, 6 months
5.2CR1
by jkrupka
Any idea when 5.2CR1 will be out? I started testing our app against 5.2M2
today.. no problems so far other than the performance test I did took about
2x as long using 5.2M2 as it did using 5.1. I know there are some
performance regressions in 5.2M2 that were fixed in CR1 so I don't want to
try troubleshooting something that have already been fixed.
--
View this message in context: http://drools.46999.n3.nabble.com/5-2CR1-tp2967218p2967218.html
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 6 months
Guvnor test scenarios public no-arg constructor
by Lisa Horton
It appears that in order to be used in a Guvnor test scenario, an class must have a public no-argument constructor. Is this true? And if so, is there a workaround for classes that have a private constructor (other than changing the object model)?
13 years, 6 months
Re: [rules-users] drools-server
by Abhay B. Chaware
I tried the latest one on tomcat.. drools-camel-server-5.2.0M2.war
To get things to work to some extent, I had to do this -
1. change the rsServer address from "/rest" to "/kservice/rest" in camel-server.xml
2. change the route from "direct://kservice" to "direct://kservice/rest" camel-client.xml
Then test.jsp gave me this reponse.
=====================
Sending Test Message
Sending Message: "Hello World"
Response: "org.apache.cxf.jaxrs.impl.ResponseImpl@169e486"
=====================
But on console, I am getting errors :
what could be wrong ?
=====================
May 20, 2011 11:55:59 AM org.apache.cxf.transport.servlet.ServletController invoke
WARNING: Can't find the request for http://localhost:8090/drools-server/kservice/rest/execute's Observer
May 20, 2011 11:55:59 AM org.apache.cxf.phase.PhaseInterceptorChain doDefaultLogging
WARNING: Interceptor for {http://localhost:8090/drools-server/kservice/rest}WebClient has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Could not send Message.
at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:64)
at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:243)
.
.
.
.
Caused by: java.io.IOException: IOException invoking http://localhost:8090/drools-server/kservice/rest/execute: HTTP response '404: Not Found'
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
... 75 more
Caused by: java.io.IOException: HTTP response '404: Not Found'
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2194)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2134)
at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1988)
... 78 more
=====================
_______________
_____
____________________
From: rules-users-bounces(a)lists.jboss.org [mailto:rules-users-bounces@lists.jboss.org] On Behalf Of Mauricio Salatino
Sent: Wednesday, May 18, 2011 10:32 PM
To: Rules Users List
Subject: Re: [rules-users] drools-server
Hi, I was refactoring and fixing some issues with Drools Server. The 5.2 version can be deployed out of the box into jboss/tomcat/jetty without any modification as far as I know. Can you try this new version?
Greetings.
2011/5/18 Abhay B. Chaware <Abhay.Chaware(a)kpitcummins.com>
Hi
I am trying to get the default drools-server.war (drools-5.1.1-server.war to be specific ) to work on tomcat.
When I access http://localhost:8090/drools-5.1.1-server/kservice/rest , I am getting “No service found” in the browser and in the console,
=================================
May 18, 2011 3:43:44 PM org.apache.cxf.transport.servlet.ServletController invoke
WARNING: Can't find the request for http://localhost:8090/drools-5.1.1-server/kservice/soap's Observer
=================================
I am able to pass the deployment of the war file and tomcat starts fine. No errors related to Spring context etc, and I also see the line in the log :
=================================
INFO: Deploying web application archive drools-5.1.1-server.war
INFO 18-05 15:42:36,280 (ContextLoader.java:initWebApplicationContext:189) Root WebApplicationContext: initialization started
May 18, 2011 3:42:48 PM org.apache.cxf.endpoint.ServerImpl initDestination
INFO: Setting the server's publish address to be /kservice/rest
DEBUG 18-05 15:42:49,146 (ContextLoader.java:initWebApplicationContext:204) Published root WebApplicationContext as ServletContext attribute with name [org.springframework.web.context.WebApplicationContext.ROOT]
INFO 18-05 15:42:49,146 (ContextLoader.java:initWebApplicationContext:209) Root WebApplicationContext: initialization completed in 12866 ms
May 18, 2011 3:42:49 PM org.apache.cxf.transport.servlet.CXFServlet updateContext
INFO: Load the bus with application context
May 18, 2011 3:42:49 PM org.apache.cxf.transport.servlet.AbstractCXFServlet replaceDestinationFactory
INFO: Servlet transport factory already registered
=================================
This message contains information that may be privileged or confidential and is the property of the KPIT Cummins Infosystems Ltd. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message. KPIT Cummins Infosystems Ltd. does not accept any liability for virus infected mails.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users
--
- CTO @ http://www.plugtree.com
- MyJourney @ http://salaboy.wordpress.com
- Co-Founder @ http://www.jbug.com.ar
- Salatino "Salaboy" Mauricio -
13 years, 6 months
Need help setting up Drools Server using Maven
by kkelleyjr
If it is not completely apparent by the subject line I am a complete noob to
Drools and Maven...
I have done a lot of reading and I think the Drools Server exposed through
soap will work for my design...
I have found some material to get me started, but I am perplexed by a very
simple issue...
Using Maven what archetype do I use to set-up the project... Using that
archetype how to set-up the packages under the archetype... And where do I
get the dependences for the drools server to set-up the server with spring
configuration... (Yes I am a noob to spring also)
I could hack at it and surely get some format to work... But I do not want
to find out later that the set-up does not grow with the project... So what
are some best practices... I have looked and can not find them or if I did
find them I am to much of a noob to understand them...
The project will have clients of the Drools Server service.
The project will have Java classes fired by the rules. These classes may
have to become exposed web services later, I just don't know yet...
Thanks for any advice, sorry for the noob post... I have just run out of
ideas to get this off the ground...
--
View this message in context: http://drools.46999.n3.nabble.com/Need-help-setting-up-Drools-Server-usin...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 6 months
DSL Enumeration / Decision Table ?
by matiasklein
Hi,
I have a DSLR that reads:
There is an event with a code of "93000"
This translates via DSL to:
[when]There is an event with a code {Code}=$event : Event(Code == {Code})
Unfortunately, I have to build many rules that are exactly the same as this,
but with different qualifying codes (i.e. rule #1 qualifies with code 9300,
93001, 93002, etc., but rule #2 qualifies with 5001, 5002, 5003, etc.).
I would like users of the system to be able to maintain the list of
qualifying codes in a spreadsheet. However, I'm not sure how to use an
enumeration loaded via a spreadsheet.
Does anyone have a recommendation on how to achieve this?
Thanks so much!
Cheers,
Matias
--
View this message in context: http://drools.46999.n3.nabble.com/DSL-Enumeration-Decision-Table-tp296166...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 6 months
Look up for KnowledgeAgent
by Riyaz Saiyed
Hi,
Is it possible to look-up for registered knowledge agent?
Basically, I want to register the agent on sever start-up via start up
listener. This agent will connect to remote guvnor server through which I
will manage application rules.
For any incoming request, I’ll look up for the agent, get knowledge base,
create new stateless session and invoke execute method on that session
object for passed request parameters.
Please let me know if any one has better idea/design to achieve this.
Thanks,
Riyaz
--
View this message in context: http://drools.46999.n3.nabble.com/Look-up-for-KnowledgeAgent-tp2931764p29...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years, 6 months
Effect of KnowledgeAgent reload on currently running rules
by Jamie Shaw
If I use the KnowledgeAgent with the 'drools.agent.newInstance' property set to 'false' to automatically reload my KnowledgeBase when resources in the changeset are updated, what happens to any existing sessions when the agent detects changes and reloads the KnowledgeBase? Do they continue to use the old rules or are they somehow reloaded in midstream? What adverse effects might I see?
I ask because I'm trying to rework some existing classes that were written to facilitate the loading and caching of KnowledgeBases created in different ways - e.g. loading decision tables, loading .drl and .rf files in the traditional manner, loading .drl and .rf files using an agent. I'd like to be able to grab a KnowledgeBase from the cache regardless of how it was created, create a session from it, and fire all of the rules, but I'm concerned about cached KnowledgeBases created by KnowledgeAgents. If I set the newInstance property to 'true', my cached KnowledgeBase will never see the updates. If I set it to 'false', my cached KnowledgeBase should see the changes, but I'm concerned about the behavior in any currently running sessions.
FYI - the classes were originally written using the Drools 4.07 RulesAgent for caching RuleBases that needed to be automatically reloaded. It seems to be working as expected. I'm trying to update those classes to use Drools 5.1 classes instead.
Thanks,
Jamie
13 years, 6 months
drools-server
by Abhay B. Chaware
Hi
I am trying to get the default drools-server.war (drools-5.1.1-server.war to be specific ) to work on tomcat.
When I access http://localhost:8090/drools-5.1.1-server/kservice/rest , I am getting "No service found" in the browser and in the console,
=================================
May 18, 2011 3:43:44 PM org.apache.cxf.transport.servlet.ServletController invoke
WARNING: Can't find the request for http://localhost:8090/drools-5.1.1-server/kservice/soap's Observer
=================================
I am able to pass the deployment of the war file and tomcat starts fine. No errors related to Spring context etc, and I also see the line in the log :
=================================
INFO: Deploying web application archive drools-5.1.1-server.war
INFO 18-05 15:42:36,280 (ContextLoader.java:initWebApplicationContext:189) Root WebApplicationContext: initialization started
May 18, 2011 3:42:48 PM org.apache.cxf.endpoint.ServerImpl initDestination
INFO: Setting the server's publish address to be /kservice/rest
DEBUG 18-05 15:42:49,146 (ContextLoader.java:initWebApplicationContext:204) Published root WebApplicationContext as ServletContext attribute with name [org.springframework.web.context.WebApplicationContext.ROOT]
INFO 18-05 15:42:49,146 (ContextLoader.java:initWebApplicationContext:209) Root WebApplicationContext: initialization completed in 12866 ms
May 18, 2011 3:42:49 PM org.apache.cxf.transport.servlet.CXFServlet updateContext
INFO: Load the bus with application context
May 18, 2011 3:42:49 PM org.apache.cxf.transport.servlet.AbstractCXFServlet replaceDestinationFactory
INFO: Servlet transport factory already registered
=================================
13 years, 6 months