Implementing A Drools Portlet
Overview Recently we put together a demo site for a prospective customer, and I was asked to create a couple of portlets using the Drools rules engine for personalization. Implementation The requirements called for one portlet to display the user’s training level and a second portlet to show the sales level. In both cases, the Drools rules would select content based on asset categories. The rules picked up personalization data placed in the session at login time by a separate login hook. This information could alternately have been directly retrieved from the database. The portlets were developed for Liferay EE 6.1 GA2 and used Drools 5.4.0. The rules engine was loaded into Liferay by the OOTB Liferay Drools portlet (drools-web) available in the Liferay Marketplace. Although rules could be customized for each instance of a portlet on a page via portlet preferences, portlets preconfigured with the required rules for sales or training allowed: rules to be saved in the s...