Drools Logging
by Laks Sundararajan
I have an application that processes rules on every request. Basically,
the application creates a stateless session for every request and fires the
rules.
My question is how to integrate drools logging into this application.
KnowledgeLoggerRuntimeFactory takes a string for filename instead of a
logger. As a result, the log file gets overwritten for every request. Is
there a way to get around this issue?
Thanks!
13 years, 9 months
(no subject)
by Billy Buzzard
I am new to drools and I would like to download the binaries and try
some of the examples. However, when I click on the download like of the
Drools binaries the screen goes dim and nothing happens. Would someone
please explain to me what is going on and what I should do to get the
binaries?
I did what Faisal Shafique suggested yesterday, so I have tried multiple
browsers from home and from work. I have tried IE 8 and Firefox 3.6.15
and nothing seems to work.
Is there another way to get the binaries like using ftp? Anyone have
any ideas what I can do next to get a copy of the binaries short of
building the binaries?
13 years, 9 months
Can not download Drools binaries
by Billy Buzzard
I'm new to drools and I would like to download the binaries and try some
of the examples. However, when I click on the download like of the
Drools binaries the screen goes dim and nothing happens. Would someone
please explain to me what is going on and what I should do to get the
binaries.
13 years, 9 months
Object insertion on runtime
by FrankVhh
Hi all,
Since yesterday, I am having a problem with reading inserted objects from
memory. I don't know why it does not go as planned, because it should be
quite straightforward. It is getting boring to stare at the code, so maybe
one of you can detect an error.
There are 2 kinds of rules. One kind inserts price objects into working
memory (as in example 1). THe other kind detects whether the price exists
and adapts it to a product (as in example 2).
Example 1 seems to work, but the engine does not seem to recognize them as a
Price object. All original price attributes of the products remain unchanged
unless:
- I manually insert a Prce object before calling fireAllRules()
or
- Checking for an existing price is commented out in the LHS
Removing constraints from $price (just checking for existance of a price)
does not help.
Any idea what has been going wrong?
Thanks in advance.
==============Example 1=================
rule "Prices_17"
lock-on-active true
when
then
Price $price = new Price();
$price.setName("Blue autumn");
$price.setPrice(6);
insert($price);
System.out.println("Price " + $price.getName() + " inserted");
end
=============Example of usage=========================
rule "Products_36"
lock-on-active true
when
$product: Product(colour == "Blue")
Season(season == Season.AUTUMN)
$price: Price(name == "Blue autumn")
then
$product.setPrice($price.getPrice());
update($product);
System.out.println("Rule executed");
end
===================================================
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Object-insertion-on-r...
Sent from the Drools - User mailing list archive at Nabble.com.
13 years, 9 months
Re: [rules-users] How to modify changeset.xml in guvnor
by kenichiwa
Maybe this will clarify things....
For this code:
...
...
...
String urlString =
"http://localhost:9080/drools-guvnor/org.drools.guvnor.Guvnor/package/defa...";
URL url = new URL(urlString);
KnowledgeAgent kagent =
KnowledgeAgentFactory.newKnowledgeAgent("TestAgent");
UrlResource urlResource = (UrlResource)ResourceFactory.newUrlResource(url);
urlResource.setBasicAuthentication("enabled");
urlResource.setUsername("admin");
urlResource.setPassword("");
kagent.applyChangeSet(urlResource);
KnowledgeBase kbase = kagent.getKnowledgeBase();
...
...
...
I am getting this exception:
[12/3/10 15:54:58:059 MST] 0000001d SystemOut O [2010:12:337
15:12:59:debug] KnowledgeAgent building resource map
[12/3/10 15:54:58:059 MST] 0000001d SystemOut O [2010:12:337
15:12:59:info] KnowledgeAgent created, with configuration:
monitorChangeSetEvents=true scanResources=true scanDirectories=true
newInstance=true
[12/3/10 15:54:58:059 MST] 00000027 SystemOut O [2010:12:337
15:12:59:info] KnowledegAgent has started listening for ChangeSet
notifications
[12/3/10 15:54:58:090 MST] 0000001f SystemOut O INFO 03-12 15:54:58,074
(NilAuthenticator.java:authenticate:51) All users are guests.
[12/3/10 15:54:58:090 MST] 0000001f SystemOut O INFO 03-12 15:54:58,090
(RepositoryServlet.java:allowUser:129) admin authenticated for rest api
[12/3/10 15:54:58:090 MST] 0000001f SystemOut O INFO 03-12 15:54:58,090
(PackageDeploymentServlet.java:a:136) PackageName: defaultPackage
[12/3/10 15:54:58:090 MST] 0000001f SystemOut O INFO 03-12 15:54:58,090
(PackageDeploymentServlet.java:a:137) PackageVersion: LATEST
[12/3/10 15:54:58:090 MST] 0000001f SystemOut O INFO 03-12 15:54:58,090
(PackageDeploymentServlet.java:a:138) PackageIsLatest: true
[12/3/10 15:54:58:090 MST] 0000001f SystemOut O INFO 03-12 15:54:58,090
(PackageDeploymentServlet.java:a:139) PackageIsSource: false
[12/3/10 15:55:18:934 MST] 0000001d SystemOut O [2010:12:337
15:12:934:info] KnowledgeAgent applying ChangeSet
[12/3/10 15:55:18:934 MST] 0000001d SystemOut O [2010:12:337
15:12:934:debug] KnowledgeAgent notifier subscribing to
resource=[UrlResource
path='http://localhost:9080/drools-guvnor/org.drools.guvnor.Guvnor/package/defa...']
[12/3/10 15:55:18:934 MST] 0000001d SystemOut O [2010:12:337
15:12:934:debug] ResourceChangeNotification subscribing
listener=org.drools.agent.impl.KnowledgeAgentImpl@3cec3cec to
resource=[UrlResource
path='http://localhost:9080/drools-guvnor/org.drools.guvnor.Guvnor/package/defa...']
[12/3/10 15:55:18:949 MST] 0000001d SystemOut O [2010:12:337
15:12:949:debug] KnowledgeAgent rebuilding KnowledgeBase using ChangeSet
[12/3/10 15:55:18:965 MST] 0000001d SystemOut O [2010:12:337
15:12:965:exception]
[12/3/10 15:55:18:965 MST] 0000001d SystemOut O
java.lang.RuntimeException: KnowledgeAgent exception while trying to
deserialize KnowledgeDefinitionsPackage
[12/3/10 15:55:18:965 MST] 0000001d SystemOut O at
org.drools.agent.impl.KnowledgeAgentImpl.createPackageFromResource(KnowledgeAgentImpl.java:664)
[12/3/10 15:55:18:965 MST] 0000001d SystemOut O at
org.drools.agent.impl.KnowledgeAgentImpl.addResourcesToKnowledgeBase(KnowledgeAgentImpl.java:889)
[12/3/10 15:55:18:965 MST] 0000001d SystemOut O at
org.drools.agent.impl.KnowledgeAgentImpl.rebuildResources(KnowledgeAgentImpl.java:704)
[12/3/10 15:55:18:965 MST] 0000001d SystemOut O at
org.drools.agent.impl.KnowledgeAgentImpl.buildKnowledgeBase(KnowledgeAgentImpl.java:584)
[12/3/10 15:55:18:965 MST] 0000001d SystemOut O at
org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:185)
[12/3/10 15:55:18:965 MST] 0000001d SystemOut O at
org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:168)
[12/3/10 15:55:18:965 MST] 0000001d SystemOut O at
com.mycompany.myapp.test.controllers.TestDroolsController.testDrools(TestDroolsController.java:41)
[12/3/10 15:55:18:965 MST] 0000001d SystemOut O at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[12/3/10 15:55:18:965 MST] 0000001d SystemOut O at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
[12/3/10 15:55:18:965 MST] 0000001d SystemOut O at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
[12/3/10 15:55:18:965 MST] 0000001d SystemOut O at
java.lang.reflect.Method.invoke(Method.java:600)
[12/3/10 15:55:18:965 MST] 0000001d SystemOut O at
org.springframework.web.servlet.mvc.multiaction.MultiActionController.invokeNamedMethod(MultiActionController.java:471)
[12/3/10 15:55:18:965 MST] 0000001d SystemOut O at
org.springframework.web.servlet.mvc.multiaction.MultiActionController.handleRequestInternal(MultiActionController.java:408)
[12/3/10 15:55:18:965 MST] 0000001d SystemOut O at
org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
[12/3/10 15:55:18:965 MST] 0000001d SystemOut O at
org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
[12/3/10 15:55:18:965 MST] 0000001d SystemOut O at
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:771)
[12/3/10 15:55:18:965 MST] 0000001d SystemOut O at
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716)
[12/3/10 15:55:18:965 MST] 0000001d SystemOut O at
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
[12/3/10 15:55:18:965 MST] 0000001d SystemOut O at
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
[12/3/10 15:55:18:965 MST] 0000001d SystemOut O at
javax.servlet.http.HttpServlet.service(HttpServlet.java:718)
[12/3/10 15:55:18:965 MST] 0000001d SystemOut O at
javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1661)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1595)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:131)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
org.springframework.security.ui.logout.LogoutFilter.doFilterHttp(LogoutFilter.java:89)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
org.springframework.security.ui.preauth.AbstractPreAuthenticatedProcessingFilter.doFilterHttp(AbstractPreAuthenticatedProcessingFilter.java:69)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:175)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:77)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:908)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:932)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:500)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:91)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:864)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1583)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:455)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:384)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:272)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1550)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O Caused by:
java.io.IOException: Server returned HTTP response code: 401 for URL:
http://localhost:9080/drools-guvnor/org.drools.guvnor.Guvnor/package/defa...
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1308)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
org.drools.io.impl.UrlResource.grabStream(UrlResource.java:210)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
org.drools.io.impl.UrlResource.getInputStream(UrlResource.java:146)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
org.drools.agent.impl.KnowledgeAgentImpl.createPackageFromResource(KnowledgeAgentImpl.java:652)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O ... 63 more
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O [2010:12:337
15:12:980:debug] KnowledgeAgent obtaining pkg resource=[UrlResource
path='http://localhost:9080/drools-guvnor/org.drools.guvnor.Guvnor/package/defa...']
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O [2010:12:337
15:12:980:exception]
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O
java.lang.RuntimeException: KnowledgeAgent exception while trying to
deserialize KnowledgeDefinitionsPackage
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
org.drools.agent.impl.KnowledgeAgentImpl.addResourcesToKnowledgeBase(KnowledgeAgentImpl.java:914)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
org.drools.agent.impl.KnowledgeAgentImpl.rebuildResources(KnowledgeAgentImpl.java:704)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
org.drools.agent.impl.KnowledgeAgentImpl.buildKnowledgeBase(KnowledgeAgentImpl.java:584)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:185)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
org.drools.agent.impl.KnowledgeAgentImpl.applyChangeSet(KnowledgeAgentImpl.java:168)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
com.mycompany.myapp.test.controllers.TestDroolsController.testDrools(TestDroolsController.java:41)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:48)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
java.lang.reflect.Method.invoke(Method.java:600)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
org.springframework.web.servlet.mvc.multiaction.MultiActionController.invokeNamedMethod(MultiActionController.java:471)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
org.springframework.web.servlet.mvc.multiaction.MultiActionController.handleRequestInternal(MultiActionController.java:408)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:153)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:48)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:771)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:644)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:549)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
javax.servlet.http.HttpServlet.service(HttpServlet.java:718)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1661)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1595)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:131)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
org.springframework.security.ui.logout.LogoutFilter.doFilterHttp(LogoutFilter.java:89)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
org.springframework.security.ui.preauth.AbstractPreAuthenticatedProcessingFilter.doFilterHttp(AbstractPreAuthenticatedProcessingFilter.java:69)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:175)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:188)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:116)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:77)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:908)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:932)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:500)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:178)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:91)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:864)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1583)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:186)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:455)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:384)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:272)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
com.ibm.io.async.ResultHandler.complete(ResultHandler.java:204)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:775)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:905)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1550)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O Caused by:
java.lang.NullPointerException
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O at
org.drools.agent.impl.KnowledgeAgentImpl.addResourcesToKnowledgeBase(KnowledgeAgentImpl.java:906)
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O ... 62 more
[12/3/10 15:55:18:980 MST] 0000001d SystemOut O [2010:12:337
15:12:980:info] KnowledgeAgent new KnowledgeBase now built and in use
[12/3/10 15:55:18:996 MST] 0000001d SystemOut O [2010:12:337
15:12:996:debug] KnowledgeAgent finished rebuilding KnowledgeBase using
ChangeSet
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/How-to-modify-changes...
Sent from the Drools - User mailing list archive at Nabble.com.
13 years, 9 months
Need clarifications on business rules
by Vkishore_Kumar
Hello,
I have a requirement to migrate some business rules from WebSphere Process Server (WPS) to the equivalent product of JBoss . The current functionality implemented on WPS is
1. Execute appropriate conditions like if-else and decision tables based on the content in the request message
2. The business rules can invoke an internal/external SOAP/HTTP web service based on the rule logic
3. The business rules can invoke an email adapter which in turn fires emails as needed
4. Eventually expose the business rules to external world as a SOAP/HTTP web service. This enables clients to invoke the business rules from a remote machine via SOAP/HTTP.
There are many products in JBoss suite like JBos Rules, JBoss Enterprise SOA Platform, JBoss Enterprise BRMS, JBoss Enterprise Middleware Suite etc.
Could anyone please suggest me what is the right product in JBoss suite using which I can build the same logic that I have built on WPS? Kindly let me know if you need any further details from my end for you to understand the requirement better.
Thanks & Regards
Kishore
________________________________
DISCLAIMER:
This email (including any attachments) is intended for the sole use of the intended recipient/s and may contain material that is CONFIDENTIAL AND PRIVATE COMPANY INFORMATION. Any review or reliance by others or copying or distribution or forwarding of any or all of the contents in this message is STRICTLY PROHIBITED. If you are not the intended recipient, please contact the sender by email and delete all copies; your cooperation in this regard is appreciated.
13 years, 9 months
Problem persisting human tasks
by raic
Hi,
I'm having problems using drools flow persistance with human tasks. I'm
using drools server.
On one hand, I have my test application, which starts a MinaTaskServer for
registering human tasks, and then, the application generates JSON commands
for executing a flow with human tasks on the execution server.
Without using flow persistence, this is working ok, i'm able to retrieve the
pending tasks and completing them without problems.
When I try to configure flow persistence on the execution server, i can
start the process, the tasks are registered ok and drools flow tables are
generated in my database (processinstanceinfo,sessioninfo,workiteminfo...)
with the correct flow information. The problem appears when i retrieve a
pending task, and then, i want to complete it. It seems that the
communication between MinaTaskServer and ExecutionServer is not ok.
The error i'm getting is the following:
[2010:11:327 18:11:661:debug] Message receieved on client :
EventTriggerResponse
[2010:11:327 18:11:661:debug] Arguments :
[org.drools.task.event.EventPayload@1b2df13]
Task completed 1
[2010:11:327 18:11:661:debug] Message receieved on client :
EventTriggerResponse
[2010:11:327 18:11:661:debug] Arguments :
[org.drools.task.event.EventPayload@1f7c6e1]
Task completed 1
[2010:11:327 18:11:770:debug] Message receieved on client : GetTaskResponse
[2010:11:327 18:11:770:debug] Arguments : [org.drools.task.Task@d17fbb51]
[2010:11:327 18:11:770:exception] Uncaught exception on client
java.lang.IllegalStateException: EntityManager is closed
at org.hibernate.ejb.EntityManagerImpl.getSession(EntityManagerImpl.java
:66)
at
org.hibernate.ejb.AbstractEntityManagerImpl.find(AbstractEntityManagerImpl.java:182)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at
org.springframework.orm.jpa.ExtendedEntityManagerCreator$ExtendedEntityManagerInvocationHandler.invoke(ExtendedEntityManagerCreator.java:358)
at $Proxy132.find(Unknown Source)
at
org.drools.persistence.processinstance.JPAWorkItemManager.completeWorkItem(JPAWorkItemManager.java:88)
at
org.drools.process.workitem.wsht.WSHumanTaskHandler$GetCompletedTaskResponseHandler.execute(WSHumanTaskHandler.java:250)
at
org.drools.task.service.TaskClientHandler.messageReceived(TaskClientHandler.java:80)
at
org.drools.task.service.mina.MinaTaskClientHandler.messageReceived(MinaTaskClientHandler.java:47)
at
org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:713)
at
org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
at
org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)
at
org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:793)
at
org.apache.mina.filter.codec.ProtocolCodecFilter$ProtocolDecoderOutputImpl.flush(ProtocolCodecFilter.java:375)
at
org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:229)
at
org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
at
org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1200(DefaultIoFilterChain.java:46)
at
org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:793)
at
org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:119)
at
org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:434)
at
org.apache.mina.core.filterchain.DefaultIoFilterChain.fireMessageReceived(DefaultIoFilterChain.java:426)
at
org.apache.mina.core.polling.AbstractPollingIoProcessor.read(AbstractPollingIoProcessor.java:638)
at
org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:598)
at
org.apache.mina.core.polling.AbstractPollingIoProcessor.process(AbstractPollingIoProcessor.java:587)
at
org.apache.mina.core.polling.AbstractPollingIoProcessor.access$400(AbstractPollingIoProcessor.java:61)
at
org.apache.mina.core.polling.AbstractPollingIoProcessor$Processor.run(AbstractPollingIoProcessor.java:969)
at
org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:64)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown
Source
)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown
Source)
at java.lang.Thread.run(Unknown Source)
And here is my configuration:
knowledge-services.xml (spring configuration)
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:drools="http://drools.org/schema/drools-spring"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://drools.org/schema/drools-spring
http://anonsvn.jboss.org/repos/labs/labs/jbossrules/trunk/drools-containe...">
<bean id="ds"
class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="com.mysql.jdbc.Driver" />
<property name="url" value="jdbc:mysql://localhost:3306/drools_flow" />
<property name="username" value="user" />
<property name="password" value="pass" />
</bean>
<drools:connection id="connection1" type="local" />
<drools:execution-node id="node1" connection="connection1" />
<drools:kbase id="kbProcessWorkItems" node="node1">
<drools:resources>
<drools:resource type="CHANGE_SET"
source="classpath:changeset.xml"/>
</drools:resources>
</drools:kbase>
<bean id="myEmf"
class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
<property name="dataSource" ref="ds" />
<property name="persistenceUnitName"
value="org.drools.persistence.jpa.local" />
</bean>
<bean id="txManager"
class="org.springframework.orm.jpa.JpaTransactionManager">
<property name="entityManagerFactory" ref="myEmf" />
</bean>
<drools:kstore id="kstore1" />
<drools:ksession id="ksession1" type="stateful" kbase="kbProcessWorkItems"
node="node1">
<drools:configuration>
<drools:jpa-persistence>
<drools:transaction-manager ref="txManager" />
<drools:entity-manager-factory ref="myEmf" />
<drools:variable-persisters>
<drools:persister for-class="javax.persistence.Entity"
implementation="org.drools.persistence.processinstance.persisters.JPAVariablePersister"/>
</drools:variable-persisters>
</drools:jpa-persistence>
</drools:configuration>
</drools:ksession>
</beans>
And here my persistence.xml:
<?xml version="1.0" encoding="UTF-8"?>
<persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:orm="http://java.sun.com/xml/ns/persistence/orm"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd
http://java.sun.com/xml/ns/persistence/orm
http://java.sun.com/xml/ns/persistence/orm_1_0.xsd">
<persistence-unit name="org.drools.persistence.jpa.local"
transaction-type="RESOURCE_LOCAL">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<class>org.drools.persistence.session.SessionInfo</class>
<class>org.drools.persistence.processinstance.ProcessInstanceInfo</class>
<class>org.drools.persistence.processinstance.WorkItemInfo</class>
<class>org.drools.persistence.processinstance.variabletypes.VariableInstanceInfo</class>
<class>org.drools.persistence.processinstance.variabletypes.JPAPersistedVariable</class>
<!-- my persistent variables -->
<class>com.sample.bussiness.model.ClientModel</class>
<properties>
<property name="hibernate.dialect"
value="org.hibernate.dialect.MySQL5Dialect"/>
<property name="hibernate.max_fetch_depth" value="3" />
<property name="hibernate.hbm2ddl.auto" value="create" />
<property name="hibernate.show_sql" value="false" />
</properties>
</persistence-unit>
</persistence>
I've seen some examples that uses bitronix but i'm not using it, i don't
know if that is the problem...
Some ideas?
Thanks
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Problem-persisting-hu...
Sent from the Drools - User mailing list archive at Nabble.com.
13 years, 9 months
How to validate literal values on the LHS of rules.
by groovenarula
Hello all,
In my use case, I am planning on using decision tables to implement rules
that contain product information (product attributes - like product grade,
product style etc). I've managed to put together the spreadsheet and have
been successful in generating different set of rules (using rule templates)
from this spreadsheet. The spreadsheet with contain basic product
information that product fact will be matched against.
e.g. The spreadsheet will contain columns of product grade and product
styles that when translated into rules, the LHS would look something like
Product ( grade == "010", style == "515" )
Where the '010' and '515' would come from a spreadsheet (decision table)
that the user's provide.
Now here's the challenge. I need to also provide a means for the user to
validate the "010" and "515". The available product grade and styles are
available in a database table. So I should be able to use that to build
second set of rules (templates). So I'm thinking, if there's a way to
convert the user supplied spreadsheet and make it a table of 'facts' of the
validation rules, I should be able to verify the value "010" "515" against
the database.
Is that the best way to go about this ? If so, can someone please point me
to a way to load facts from a spreadsheet ? I have looked around and found
that there is a jxls project that allows loading of JavaBeans from values in
spreadsheet. But it requires xml files to be configured. I really like the
way rule templates work (by simply state substitution variables in the
template itself - thereby avoiding the whole need to configuration xml
files). I think if there's a way to load facts using templates from a
spreadsheet, I should be able to use that concept to validate the values in
my rules.
So is it possible to do the above ? Also is there a better way ?
Any insight would be appreciated.
Thanks in advance,
Gurvinder
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/How-to-validate-liter...
Sent from the Drools - User mailing list archive at Nabble.com.
13 years, 9 months
How to specify relative URL in chagenset.xml file
by Pardeep Ruhil
Hi,
I am getting File Not Found Exception when I try to give relative path of the file.
<resource source='file:../HelloWorld.drl' type='DRL' />
But when I give the complete path, It picks the changeset.xml file.
<resource source='file:C:/Tomcat/webapps/DroolsCheck/HelloWorld.drl' type='DRL' />
Please tell me the syntax for using the relative path for my workflow or rule files.
Thanks & Regards
Pradeep Ruhil
________________________________
This Email may contain confidential or privileged information for the intended recipient (s) If you are not the intended recipient, please do not use or disseminate the information, notify the sender and delete it from your system.
______________________________________________________________________
13 years, 9 months
Drools Logging
by Laks Sundararajan
Hello There,
I'm using Drools as a part of my current project and have a few questions. I
subscribed to the forums and posted a new question but it keeps showing up
as pending.
Do I need to do anything else from my side?
Thanks!
13 years, 9 months