Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Pranay Sanam
Drools rules engine for LR-CE-6.1.1-GA2
December 19, 2012 5:09 AM
Answer

Pranay Sanam

Rank: Junior Member

Posts: 32

Join Date: August 14, 2012

Recent Posts

Hi Friends,

Could some one please help how to integrate rules engine for Liferay-CE-6.1.1-GA2.

I've been referring This Tutorial for help but stopped at adding Liferay-portlet-archetype.

Thanks,
Pranay
Pranay Sanam
RE: Drools rules engine for LR-CE-6.1.1-GA2
December 19, 2012 5:09 AM
Answer

Pranay Sanam

Rank: Junior Member

Posts: 32

Join Date: August 14, 2012

Recent Posts

Plz see through this guys emoticon
David H Nebinger
RE: Drools rules engine for LR-CE-6.1.1-GA2
December 19, 2012 5:48 AM
Answer

David H Nebinger

Rank: Liferay Legend

Posts: 7238

Join Date: September 1, 2006

Recent Posts

The integration blog deals with using the drools plugins for integrating drools into EE. It provides portlets that have visibility into the drools engine.

That said, EE and the drools plugins are not necessary to use drools.

Drools comes as a bunch of jars. You can include them in your own plugin and create the appropriate objects manually, i.e. populating rules and working memory with your facts. You can then evaluate the rules and get your own results and do whatever with them.

No magic, no serious integration stuff, etc. You just don't get the functionality that the drools EE plugins provide...
Sushil Saini
RE: Drools rules engine for LR-CE-6.1.1-GA2
December 19, 2012 6:06 AM
Answer

Sushil Saini

Rank: Regular Member

Posts: 104

Join Date: July 27, 2011

Recent Posts

Thanks David,.. for this useful information..
Hitoshi Ozawa
RE: Drools rules engine for LR-CE-6.1.1-GA2
December 19, 2012 6:09 AM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7954

Join Date: March 23, 2010

Recent Posts

David, I don't that wiki is about drools in EE. I think the question is basically on how to use archtype.
David H Nebinger
RE: Drools rules engine for LR-CE-6.1.1-GA2
December 19, 2012 6:14 AM
Answer

David H Nebinger

Rank: Liferay Legend

Posts: 7238

Join Date: September 1, 2006

Recent Posts

The question, though, was how to use drools in CE and how he stopped early in.

I explained how to use drools in CE. Following the blog is not going to help him since he has neither EE or the drools EE plugin...
Hitoshi Ozawa
RE: Drools rules engine for LR-CE-6.1.1-GA2
December 19, 2012 6:28 AM
Answer

Hitoshi Ozawa

Rank: Liferay Legend

Posts: 7954

Join Date: March 23, 2010

Recent Posts

Wow, does liferay's drools plugin require one to download drools and do all that? Seems too complicated for most regular users to use.
David H Nebinger
RE: Drools rules engine for LR-CE-6.1.1-GA2
December 19, 2012 9:19 AM
Answer

David H Nebinger

Rank: Liferay Legend

Posts: 7238

Join Date: September 1, 2006

Recent Posts

Don't know, I've never had need of it.

I have used drools however within a portlet. Drools is a great rules engine, useful for many tasks.

I'm just not sure what value add there is with the drools plugins... I'm guessing they have some interface elements for the underlying engine and such.
Pranay Sanam
RE: Drools rules engine for LR-CE-6.1.1-GA2
December 19, 2012 10:03 PM
Answer

Pranay Sanam

Rank: Junior Member

Posts: 32

Join Date: August 14, 2012

Recent Posts

David H Nebinger:
That said, EE and the drools plugins are not necessary to use drools.

Drools comes as a bunch of jars. You can include them in your own plugin and create the appropriate objects manually, i.e. populating rules and working memory with your facts. You can then evaluate the rules and get your own results and do whatever with them.


Thank u very much for replying sir.. but can u please elaborate on that or can u post a link or something that has details about what u've said?

U meant to say that just put those JARS in portlet project and we can use the functionality??

The problem with what i've tried is I couldn't get the archetypes anywhere. and i think it isn't going to be possible without those.
David H Nebinger
RE: Drools rules engine for LR-CE-6.1.1-GA2
December 20, 2012 5:46 AM
Answer

David H Nebinger

Rank: Liferay Legend

Posts: 7238

Join Date: September 1, 2006

Recent Posts

That's a maven issue. Maven support is very new to Liferay and I don't believe they have all of the issues straightened out yet.

Just use the IDE and the SDK to create a standard portlet plugin, add your jars to it, and do the development without maven.
Pranay Sanam
RE: Drools rules engine for LR-CE-6.1.1-GA2
December 26, 2012 9:56 PM
Answer

Pranay Sanam

Rank: Junior Member

Posts: 32

Join Date: August 14, 2012

Recent Posts

Hi,

like u said i have downloaded a sample drools portlet which was built with the set of drools-jars.

now when i run the portlet in portal it is giving the following errors i m giving the log here....

  1org.drools.RuntimeDroolsException: Unable to load dialect 'org.drools.rule.builder.dialect.java.JavaDialectConfiguration:java:org.drools.rule.builder.dialect.java.JavaDialectConfiguration'
  2    at org.drools.compiler.PackageBuilderConfiguration.addDialect(PackageBuilderConfiguration.java:283)
  3    at org.drools.compiler.PackageBuilderConfiguration.buildDialectConfigurationMap(PackageBuilderConfiguration.java:268)
  4    at org.drools.compiler.PackageBuilderConfiguration.init(PackageBuilderConfiguration.java:181)
  5    at org.drools.compiler.PackageBuilderConfiguration.<init>(PackageBuilderConfiguration.java:159)
  6    at org.drools.compiler.PackageBuilder.<init>(PackageBuilder.java:210)
  7    at org.drools.compiler.PackageBuilder.<init>(PackageBuilder.java:143)
  8    at org.drools.builder.impl.KnowledgeBuilderFactoryServiceImpl.newKnowledgeBuilder(KnowledgeBuilderFactoryServiceImpl.java:34)
  9    at org.drools.builder.KnowledgeBuilderFactory.newKnowledgeBuilder(KnowledgeBuilderFactory.java:47)
 10    at main.java.com.liferay.insurance.InsurancePortlet.readKnowledgeBase(InsurancePortlet.java:107)
 11    at main.java.com.liferay.insurance.InsurancePortlet.processAction(InsurancePortlet.java:75)
 12    at com.liferay.portlet.FilterChainImpl.doFilter(FilterChainImpl.java:70)
 13    at com.liferay.portal.kernel.portlet.PortletFilterUtil.doFilter(PortletFilterUtil.java:48)
 14    at com.liferay.portal.kernel.servlet.PortletServlet.service(PortletServlet.java:111)
 15    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
 16    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
 17    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
 18    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)
 19    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:73)
 20    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
 21    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
 22    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
 23    at org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:593)
 24    at org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:530)
 25    at com.liferay.portlet.InvokerPortletImpl.invoke(InvokerPortletImpl.java:534)
 26    at com.liferay.portlet.InvokerPortletImpl.invokeAction(InvokerPortletImpl.java:579)
 27    at com.liferay.portlet.InvokerPortletImpl.processAction(InvokerPortletImpl.java:294)
 28    at com.liferay.portal.action.LayoutAction.processPortletRequest(LayoutAction.java:944)
 29    at com.liferay.portal.action.LayoutAction.processLayout(LayoutAction.java:688)
 30    at com.liferay.portal.action.LayoutAction.execute(LayoutAction.java:249)
 31    at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:431)
 32    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:236)
 33    at com.liferay.portal.struts.PortalRequestProcessor.process(PortalRequestProcessor.java:176)
 34    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
 35    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
 36    at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
 37    at com.liferay.portal.servlet.MainServlet.callParentService(MainServlet.java:560)
 38    at com.liferay.portal.servlet.MainServlet.service(MainServlet.java:537)
 39    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
 40    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
 41    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
 42    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)
 43    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
 44    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
 45    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
 46    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
 47    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
 48    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:163)
 49    at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:294)
 50    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:57)
 51    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:206)
 52    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:108)
 53    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:73)
 54    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
 55    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
 56    at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:684)
 57    at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:471)
 58    at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:402)
 59    at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:329)
 60    at com.liferay.portal.servlet.FriendlyURLServlet.service(FriendlyURLServlet.java:138)
 61    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
 62    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
 63    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
 64    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:72)
 65    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
 66    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
 67    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:163)
 68    at com.liferay.portal.servlet.filters.strip.StripFilter.processFilter(StripFilter.java:335)
 69    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:57)
 70    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:206)
 71    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:108)
 72    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
 73    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:163)
 74    at com.liferay.portal.servlet.filters.gzip.GZipFilter.processFilter(GZipFilter.java:123)
 75    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:57)
 76    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:206)
 77    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:108)
 78    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:163)
 79    at com.liferay.portal.servlet.filters.secure.SecureFilter.processFilter(SecureFilter.java:294)
 80    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:57)
 81    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:206)
 82    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:108)
 83    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:163)
 84    at com.liferay.portal.servlet.filters.i18n.I18nFilter.processFilter(I18nFilter.java:241)
 85    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:57)
 86    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:206)
 87    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:108)
 88    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
 89    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
 90    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
 91    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:163)
 92    at com.liferay.portal.servlet.filters.autologin.AutoLoginFilter.processFilter(AutoLoginFilter.java:246)
 93    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:57)
 94    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:206)
 95    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:108)
 96    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:163)
 97    at com.liferay.portal.servlet.filters.sso.ntlm.NtlmPostFilter.processFilter(NtlmPostFilter.java:83)
 98    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:57)
 99    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:206)
100    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:108)
101    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:163)
102    at com.liferay.portal.sharepoint.SharepointFilter.processFilter(SharepointFilter.java:80)
103    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:57)
104    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:206)
105    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:108)
106    at com.liferay.portal.kernel.servlet.BaseFilter.processFilter(BaseFilter.java:163)
107    at com.liferay.portal.servlet.filters.virtualhost.VirtualHostFilter.processFilter(VirtualHostFilter.java:216)
108    at com.liferay.portal.kernel.servlet.BaseFilter.doFilter(BaseFilter.java:57)
109    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:206)
110    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:108)
111    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:187)
112    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:95)
113    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
114    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
115    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
116    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
117    at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:738)
118    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDoFilter(InvokerFilterChain.java:206)
119    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:108)
120    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:167)
121    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:95)
122    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
123    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:167)
124    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:95)
125    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:116)
126    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.processDirectCallFilter(InvokerFilterChain.java:187)
127    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilterChain.doFilter(InvokerFilterChain.java:95)
128    at com.liferay.portal.kernel.servlet.filters.invoker.InvokerFilter.doFilter(InvokerFilter.java:73)
129    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
130    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
131    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
132    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
133    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
134    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
135    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
136    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
137    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
138    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
139    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:999)
140    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:565)
141    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)
142    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
143    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
144    at java.lang.Thread.run(Thread.java:722)
145Caused by: org.drools.RuntimeDroolsException: value '1.7' is not a valid language level
146    at org.drools.rule.builder.dialect.java.JavaDialectConfiguration.getDefaultLanguageLevel(JavaDialectConfiguration.java:162)
147    at org.drools.rule.builder.dialect.java.JavaDialectConfiguration.init(JavaDialectConfiguration.java:57)
148    at org.drools.compiler.PackageBuilderConfiguration.addDialect(PackageBuilderConfiguration.java:279)
149    ... 142 more


Please help me with this...

I've searched all the web but couldn't find a solution.

Thanks in advance emoticon
Pranay Sanam
RE: Drools rules engine for LR-CE-6.1.1-GA2
December 26, 2012 9:57 PM
Answer

Pranay Sanam

Rank: Junior Member

Posts: 32

Join Date: August 14, 2012

Recent Posts

hi friends please see through this once..
Juan Gonzalez
RE: Drools rules engine for LR-CE-6.1.1-GA2
December 26, 2012 11:10 PM
Answer

Juan Gonzalez

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1984

Join Date: October 28, 2008

Recent Posts

Seems isn't compatible with JDK 1.7? Try with 1.6.
Pranay Sanam
RE: Drools rules engine for LR-CE-6.1.1-GA2
December 27, 2012 12:03 AM
Answer

Pranay Sanam

Rank: Junior Member

Posts: 32

Join Date: August 14, 2012

Recent Posts

hi Gonzalez,

Thank you so much 4 that reply.

trying with 1.6 means.. should i install jdk 1.6 or just changing the version number of jdk in project facets is enough???

i've already tried the latter one but of no use!!
Juan Gonzalez
RE: Drools rules engine for LR-CE-6.1.1-GA2
December 27, 2012 12:43 AM
Answer

Juan Gonzalez

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1984

Join Date: October 28, 2008

Recent Posts

I suppose you'd have to change the JDK that is running your app server. That would imply changing JAVA_HOME, JRE_HOME etc depending in your environment and server (Tomcat, etc).