Questions regarding Guvnor
by Harshit Bapna
Hello All,
Few questions:
1. What is the release date of Guvnor 5.2 ? (Couldn't find it from the site
of the documentation)
I am interested in the functionality to add the guvnor editors in
another app for rule editing. i.e. StandaloneEditorServlet
2. Which SVN TAG of the Guvnor (which has standalone editor functionality)
should I use ?
Note: On trunk I have observed that the war contains a folder *guvnor* where
as guvnor 5.1 war contained folder *org.drools.guvnor.Guvnor*
Also the web.xml in the trunk has the following url pattern <url-pattern>/*
org.drools.guvnor.Guvnor*/feed/*</url-pattern>
This url pattern would never be matched as the Guvnor.html is under
guvnor/Guvnor.html. To make it work I had to update the url patterns in the
web.xml
Is there anything that I am doing wrong ? (mvn clean install
-Dmaven.test.failure.ignore=true)
IMO, the trunk has partial changes checked in. Hence it is not stable.
Thanks
12 years, 11 months
KnowledgeAgent and applyChangeSet
by bob.breitling
If I have a KnowledgeAgent and I create a URL Resource and set its
basicAuthenication, username and password attributes then I call the agents
applyChangeSet method I get a HTTPD 401 response from the Guvnor. It does
not happen to my resourse which has a valid username and password, but it
happens to the resource in the changeSet xml tag.
It would seem to me that the resources that are built from the resource I
passed would inherit the basicAuthenication, username and password
attributes that I set and know work, but they don't and I get this error.
If I debug the code and filling in those values on the resource passed to
the createPackageFromResource method before the resource stream is read the
code works.
I am using the NilAuthenicator in the Guvnor components.xml and that seems
to be working. I get access to the Guvnor without being asked for
credentials.
I tried to configure my jboss (4.2.0) in login-config.xml to allow access to
everything as guest. But no luck.
Any suggestions?
Bob
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/KnowledgeAgent-and-ap...
Sent from the Drools - User mailing list archive at Nabble.com.
12 years, 12 months
Flow isn't behaving as I'd expect
by Jamie
I'm having some issues with the interaction between Flow, ruleflow-groups and
AgendaFilters. I've tried it with 5.1.1, 5.2.0 using .rf files and 5.2.0
using .bpmn files, all with the same results, so I'm sure I'm just
misunderstanding something.
I have a flow that looks like this:
http://drools.46999.n3.nabble.com/file/n3200994/fraud_analysis_flow.jpg
Rules 011 and 051 are in ruleflow-group customerAnalysis and rule 018 is in
ruleflow-group customerActivityFilterAndLookup. I added some debugging via
event listeners and if I don't use an agenda filter, I see the following
output:
Executing test Rule018TestCase001
Rules engine initialized
Invoking rules for rule name Rule 018 - Good AVS Buyer
Created activation for [Rule 018 - Good AVS Buyer]
Created activation for [Rule 011 - Bad Zip 9 Address]
Created activation for [Rule 051 - Suspicious Buyer Email]
Triggered node [Order Analysis]
Triggered node [Start Fraud Analysis Flow]
Triggered node [Customer Analysis]
About to fire [Rule 051 - Suspicious Buyer Email]
====> Rule 051 fired for order: 000000022
About to fire [Rule 011 - Bad Zip 9 Address]
====> Rule 011 fired for order: 000000022
Triggered node [Customer Activity Filter And Lookup]
About to fire [Rule 018 - Good AVS Buyer]
Created activation for [Rule 051 - Suspicious Buyer Email]
Created activation for [Rule 011 - Bad Zip 9 Address]
====> Rule 018 fired for order: 210105
Triggered node [Customer Activity Analysis]
Triggered node [Suspect Reason Code Review]
Triggered node [End Fraud Analysis Flow]
Rules executed successfully
The results are roughly what I'd expect, but I have some questions:
- Why do the activations get created for these 3 rules before any flows
have started?
- Why does the [Order Analysis] node get triggered before the [Start Fraud
Analysis Flow] node?
- Why are activations created again for 011 and 051 just prior to 018
firing?
If I introduce an AgendaFilter that only allows a rule with a specific name
to fire, things get stranger to me. If I only allow rule 018, I get the
following output:
Executing test Rule018TestCase001
Invoking rules for rule name Rule 018 - Good AVS Buyer
Created activation for [Rule 018 - Good AVS Buyer]
Created activation for [Rule 011 - Bad Zip 9 Address]
Created activation for [Rule 051 - Suspicious Buyer Email]
Triggered node [Order Analysis]
Triggered node [Start Fraud Analysis Flow]
Triggered node [Customer Analysis]
Rejecting firing of [Rule 051 - Suspicious Buyer Email] because name
doesn't match.
Cancelled activation for [Rule 051 - Suspicious Buyer Email] because FILTER
Rejecting firing of [Rule 011 - Bad Zip 9 Address] because name doesn't
match.
Cancelled activation for [Rule 011 - Bad Zip 9 Address] because FILTER
Rules executed successfully
Ruleflow customerActivityFilterAndLookup doesn't even get triggered, nor do
any nodes after that. Why not?
--
View this message in context: http://drools.46999.n3.nabble.com/Flow-isn-t-behaving-as-I-d-expect-tp320...
Sent from the Drools: User forum mailing list archive at Nabble.com.
12 years, 12 months
OSGi version of Drools
by Flavius Vespasianus
Hello,
is there anywhere a OSGi bundle with Drools 4.0.7? I know about
com.springsource.org.drools.* but these had a lot of additional
dependencies and I wasn't able to get them work.
My problem is that I need to have three projects: one is the basic
library which uses Drools very intensively. The second project is editor
- an Eclipse plugin (that's why I need the OSGi bundle) using some
classes from the basic library. It doesn't use Drools, but there is a
dependency. The third project is classic Java application, also using
the basic library.
The basic library was originally created using standard Drools project
wizard (I have downloaded the Eclipse Drools plugin -
org.drools.eclipse). But when I tried to deploy it as an Eclipse plugin,
it couldn't find the Drools classes.
I found a little workaround - I have compiled the binaries (drools-core,
drools-compiler and from libs the mvel, antlr3 and eclipse-jdt-core)
into separate plugin using "Create a plugin from existing jars" wizard.
But if I add this dependency to the basic library, I get a
NullPointerException error on every dslr file and I cannot run the
application properly). At least the second project (editor) can be compiled.
What am I doing wrong? Or can I find somewhere the binaries compiled
correctly into OSGi bundle?
Thanks a lot!
Flavius
12 years, 12 months
Drools Expert 5 OSGi
by jflamy
I want to manage Drools Expert rules with Drools Guvnor. My understanding is
that requires the use of Drools Expert version 5.
I also need to use an OSGi-packaged version of Drools Expert.
I saw a forum posting in 2010 alluding to such a beast, but the springsource
forums only provide 4.0.7.
Is there a ready-made OSGi bundle for drools expert 5, or alternately
specific instructions for building one ?
Jean-François Lamy
--
View this message in context: http://n3.nabble.com/Drools-Expert-5-OSGi-tp681546p681546.html
Sent from the Drools - User mailing list archive at Nabble.com.
12 years, 12 months
Drools Server 5.1.1 - can't run test.jsp
by OlliSee
Hi there.
I was trying to setup the Drools Server. As I understand, this is not a
server per se, its just the usual Drools with some framework plumbing. But I
appreciate not having to do that myself. But I can't get it to work.
I imported the .war file into my Eclipse and tried to deploy it to a few
application servers, but it didn't work.
I tried Tomcat 6/7, JBoss AS 4.2.2/4.2.3/5.0.1/5.1.0 (I know, they are just
using Tomcat, but I gave it a shot anyway...).
The .war deploys right I guess. But as soon as I try to run the test.jsp, I
get a lot of errors.
The log below is from Tomcat 6,...
31.01.2011 10:51:00 org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal
performance in production environments was not found on the
java.library.path:
C:\Programme\Java\jdk1.6.0_22\bin;.;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:/Programme/Java/jre6/bin/client;C:/Programme/Java/jre6/bin;C:/Programme/Java/jre6/lib/i386;C:\Programme\ActiveState
Komodo Edit 6\;C:\Programme\Mendeley
Desktop\wordPlugin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;%JAVA_HOME%\bin;C:\Programme\QuickTime\QTSystem\;C:\derby\bin
31.01.2011 10:51:00 org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNUNG: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting
property 'source' to 'org.eclipse.jst.jee.server:drools-5.1.1-server' did
not find a matching property.
31.01.2011 10:51:00 org.apache.coyote.AbstractProtocolHandler init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
31.01.2011 10:51:00 org.apache.coyote.AbstractProtocolHandler init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
31.01.2011 10:51:00 org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 616 ms
31.01.2011 10:51:00 org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
31.01.2011 10:51:00 org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.6
31.01.2011 10:51:01 org.apache.catalina.loader.WebappClassLoader
validateJarFile
INFO: validateJarFile(C:\Dokumente und Einstellungen\o.roess\Eigene
Dateien\Drools Server
Workspace\.metadata\.plugins\org.eclipse.wst.server.core\tmp0\wtpwebapps\drools-5.1.1-server\WEB-INF\lib\servlet-api-2.3.jar)
- jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class:
javax/servlet/Servlet.class
31.01.2011 10:51:11 org.apache.catalina.core.ApplicationContext log
INFO: Initializing Spring root WebApplicationContext
log4j:WARN No appenders could be found for logger
(org.springframework.web.context.ContextLoader).
log4j:WARN Please initialize the log4j system properly.
31.01.2011 10:51:18 org.apache.cxf.endpoint.ServerImpl initDestination
INFO: Setting the server's publish address to be /kservice/rest
31.01.2011 10:51:18 org.apache.cxf.transport.servlet.CXFServlet
updateContext
INFO: Load the bus with application context
31.01.2011 10:51:19 org.apache.cxf.transport.servlet.AbstractCXFServlet
replaceDestinationFactory
INFO: Servlet transport factory already registered
31.01.2011 10:51:19 org.apache.coyote.AbstractProtocolHandler start
INFO: Starting ProtocolHandler ["http-bio-8080"]
31.01.2011 10:51:19 org.apache.coyote.AbstractProtocolHandler start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
31.01.2011 10:51:19 org.apache.catalina.startup.Catalina start
INFO: Server startup in 18193 ms
Maybe there is already something wrong?
Ok then, this happens when I try to navigate to the test.jsp in my browser
31.01.2011 10:55:00 org.apache.cxf.phase.PhaseInterceptorChain
doDefaultLogging
WARNUNG: Interceptor for
{http://localhost:8080/drools-server-app/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)
at
org.apache.cxf.jaxrs.client.WebClient.doChainedInvocation(WebClient.java:615)
at
org.apache.cxf.jaxrs.client.WebClient.doInvoke(WebClient.java:596)
at org.apache.cxf.jaxrs.client.WebClient.invoke(WebClient.java:241)
at
org.apache.camel.component.cxf.jaxrs.CxfRsProducer.invokeHttpClient(CxfRsProducer.java:129)
at
org.apache.camel.component.cxf.jaxrs.CxfRsProducer.process(CxfRsProducer.java:71)
at
org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:50)
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)
at
org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:104)
at
org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:272)
at
org.apache.camel.processor.SendProcessor.process(SendProcessor.java:98)
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)
at
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)
at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)
at
org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:99)
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)
at
org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:290)
at
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:202)
at
org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:256)
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:143)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:78)
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)
at
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)
at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)
at
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)
at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)
at
org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:99)
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)
at
org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:290)
at
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:202)
at
org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:256)
at
org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:113)
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)
at
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)
at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)
at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)
at
org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:61)
at
org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:99)
at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:91)
at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:85)
at
org.apache.camel.processor.UnitOfWorkProducer.process(UnitOfWorkProducer.java:63)
at
org.apache.camel.impl.ProducerCache$1.doInProducer(ProducerCache.java:333)
at
org.apache.camel.impl.ProducerCache$1.doInProducer(ProducerCache.java:304)
at
org.apache.camel.impl.ProducerCache.doInProducer(ProducerCache.java:208)
at
org.apache.camel.impl.ProducerCache.sendExchange(ProducerCache.java:303)
at org.apache.camel.impl.ProducerCache.send(ProducerCache.java:171)
at
org.apache.camel.impl.DefaultProducerTemplate.send(DefaultProducerTemplate.java:114)
at
org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:118)
at
org.apache.camel.impl.DefaultProducerTemplate.sendBody(DefaultProducerTemplate.java:135)
at
org.apache.camel.impl.DefaultProducerTemplate.requestBody(DefaultProducerTemplate.java:283)
at
org.apache.camel.impl.DefaultProducerTemplate.requestBody(DefaultProducerTemplate.java:313)
at org.drools.server.Test.execute(Test.java:68)
at org.drools.server.Test.send(Test.java:60)
at org.apache.jsp.test_jsp._jspService(test_jsp.java:77)
at
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:417)
at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:391)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:306)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:550)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:380)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:243)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:188)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:166)
at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:288)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.io.IOException: IOException invoking
http://localhost:8080/drools-server-app/kservice/rest/execute: HTTP response
'404: Not Found'
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.mapException(HTTPConduit.java:2058)
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:2043)
at
org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
at
org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:639)
at
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
... 79 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)
... 82 more
Anyone got an idea?
Thanks!
Kind regards
Oliver
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Drools-Server-5-1-1-c...
Sent from the Drools - User mailing list archive at Nabble.com.
13 years
Setting typesafe in decision tables
by abr
In Drools 5.3, is it possible to add the typesafe notation to an object
within a decision table?
The idea behind this question is to be able to define conditions on fields
that cannot be resolved at compile time but that can be at runtime.
(e.g. define conditions on event.payload.field1 where event.payload is a
java.lang.Object and field1 an attribute of the object's class set in
event.payload at runtime)
I've tried to disable MVEL strict mode but without success.
Note: this worked in Drools 5.1 because of the more permissive parsing
method.
By the way, if you have other ideas that should work, I opened to them :-)
Best,
Alexis
--
View this message in context: http://drools.46999.n3.nabble.com/Setting-typesafe-in-decision-tables-tp3...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years
Dynamic Fact(field) Generation in Declarative Model
by srinivasasanda
Hi All,
Please help on this issue
I created a declarative model Person in personDetails package in Drools
Gunvor with 2 fields(age,amount).Now,I need to insert one field with name
gender and datatype String into that declarative model through POJO
class..Here is my code
RuleAgent agent = RuleAgent.newRuleAgent("/Guvnor.properties");
RuleBase rb = agent.getRuleBase();
WorkingMemory workingMemory = rb.newStatefulSession();
PackageBuilder pkgBuilder=new PackageBuilder(rb);
FactType personType = rb.getFactType( "persondetails.Person" );
ClassDefinition cDefinition=(ClassDefinition)
rb.getFactType("persondetails.Person");
FieldDefinition gen = new FieldDefinition( "gender",
"java.lang.String" );
product.setKey(true);
cDefinition.addField(product);
workingMemory.insert(cDefinition);
FactHandle fc=workingMemory.getFactHandle(cDefinition);
workingMemory.update(fc, cDefinition);
rb.newStatelessSession().execute(new Object[] {cDefinition});
}
String s1=cDefinition.getField(0).getTypeName();
String name1=cDefinition.getField(0).getName();
System.out.println(s1);
System.out.println(name1);
String s2=cDefinition.getField(1).getTypeName();
String name2=cDefinition.getField(1).getName();
System.out.println(s2);
System.out.println(name2);
String s3=cDefinition.getField(2).getTypeName();
String name3=cDefinition.getField(2).getName();
System.out.println(s3);
System.out.println(name3);
Output as Age---Java.lang.Integer
Amount-java.lang.Integer
Gender--Java.lang.String..
And when i am printing
It is executing successfuly first time without errors.but i could not find
gender in declarative model.It is failed to inserting.Can anyone help me in
this..plZzzzzz...I was struggling with this....
When Iam executing second time it is displaying as Exception:couldnot find
gender in declarative model..It means iam unable to commit Data into
Server..(Drools guvnor Model)
Please help on this....
--
View this message in context: http://drools.46999.n3.nabble.com/Dynamic-Fact-field-Generation-in-Declar...
Sent from the Drools: User forum mailing list archive at Nabble.com.
13 years