Release Notes 5.9.1

New Features

Test framework for web services

Implemented possibility to add tests projects based on OpenL Web Services. Two types of tests were added. There are tests for testing rules logic and for full testing rules logic including transport and binding.

Cache in Web Services by memory footprint size

New settings for caching in Web Services allow specifying memory size to use.

Multimodule with Customized Dispatching

There is additional mode for multimodule which gives you a possibility to handle dispatching between modules by your own logic. That means OpenL Tablets will pass the control of selection of the needed module to your class. The following steps indicate how to adjust multimodule with your own dispatching:

  1. Create java interface representing your rules.
  2. For each method from the interface determine the dispatching:

    a. For methods that represents Data tables you should provide implementation of org.openl.rules.ruleservice.publish.cache.dispatcher.ModuleDispatcherForData and mark that method by the org.openl.rules.ruleservice.publish.cache.dispatcher.DispatchedData annotation.

    b. For methods that represent Rules you should provide implementation of org.openl.rules.ruleservice.publish.cache.dispatcher.ModuleDispatcherForMethods and mark that method by the org.openl.rules.ruleservice.publish.cache.dispatcher.DispatchedMethod annotation.

  3. Create your implementation of org.openl.rules.ruleservice.publish.RuleServiceInstantiationStrategyFactory that will return DispatchedMultiModuleInstantiationStrategy instead of lazy multimodule (by default) and register it in openl-ruleservice-override-beans.xml.

Notes:

  • ModuleDispatcherForData and ModuleDispatcherForMethods must have public constructor without parameters. The aim of these classes is to select the needed Module according to Runtime context and the executed method (that means the rule name and arguments for the method representing Rule, and Data table for method representing data).
  • If you use dispatched multimodule then the interface with annotated methods is obligatory, otherwise you will get an exception.
  • If you have simultaneously getter and setter for some Data you can annotate only one of them.
  • You can provide different dispatching logic for different methods.

See example in org.openl.rules.ruleservice.multimodule.DispaspatchedMultiModuleTest.

Improvements

Core:

  • Generated attributes in Datatype classes are sorted: To provide better source code suitability for version comparison, code generators for java datatypes and wrappers sort generated attributes and methods alphabetically before generation

WebStudio:

  • Added warning message when user tries to revert changes with already opened excel file
  • 'By Category' view is a default view
  • Introduced tree arguments for expected and actual results in results of running tests
  • After refreshing the last viewed page is displayed instead of Welcome page
  • Table creation wizard: sort worksheets by alphabet

Upgraded libs:

  • Spring Framework to v3.1.1
  • Spring Security to v3.1.0
  • EhCache to v2.5.1
  • Hibernate ORM (new name) to v4.1
  • Mojarra to v2.1.7
  • javassist to v3.15.0
  • hsqldb to v2.2.8
  • CXF to v2.5.1

Fixed Bugs

  • WebStudio: 'Edit as new version'/'Copy': When user presses 'Cancel' button the original table should appear.
  • WebStudio: Warning about changes in Excel file displays even before user makes any changes
  • WebStudio: Something wrong is returned from the overloaded by properties table node
  • WebStudio: 500 error on trace for some nodes
  • WebStudio: Error for incorrect value of alias datatype isn't display in case of array
  • WebStudio: Boolean default values cannot be defined via 'yes' 'no' 'y' 'n'
  • WebStudio: Cannot define default value for datatypes by using spaces: error displays
  • WebStudio: Search by a phrase isn't working in Chrome and IE 9.0
  • WebStudio: Simple search doesn't recognize special characters
  • WebStudio: After clicking CANCEL btn warning 'Project was modified' doesn't appear any more
  • Core: Equals method for generated datatypes at runtime doesn’t work in byte code
  • Core: TBasic with void return type contains return value in trace

Migration

  • Web Services: Follow the guide below

Migration steps for Web services

1) Change OpenL version from 5.9.0 to 5.9.1

2) Change beans in WEB-INF/openl-ruleservice-beans.xml file:

a) ratingService bean change

From:

<bean id="ruleService" class="org.openl.rules.ruleservice.core.RuleService">

<property name="loader" ref="rulesLoader"></property>

<property name="publisher" ref="rulesPublisher"></property>

</bean>

To:

<bean id="ruleService" class="org.openl.rules.ruleservice.core.RuleServiceImpl">

<property name="ruleServiceInstantiationFactory" ref="ruleServiceInstantiationFactory"/>

<property name="ruleServicePublisher" ref="ruleServicePublisher"/>

</bean>

b) serviceManager bean change

From:

<bean id="serviceManager" class="org.openl.rules.ruleservice.management.ServiceManager">

<property name="serviceConfigurer" ref="serviceConfigurer"/>

<property name="ruleService" ref="ruleService"/>

<property name="rulesLoader" ref="rulesLoader"/>

</bean>

To:

<bean id="serviceManager" class="org.openl.rules.ruleservice.management.ServiceManagerImpl">

<property name="serviceConfigurer" ref="serviceConfigurer"/>

<property name="ruleService" ref="ruleService"/>

<property name="ruleServiceLoader" ref="ruleServiceLoader"/>

</bean>

2) Change beans in rating-server-core-loader-beans.xml

a) change "ruleLoader" bean

From:

<bean id="rulesLoader" class="org.openl.rules.ruleservice.loader.RulesLoader">

<constructor-arg name="dataSource" ref="datasource" />

<constructor-arg name="projectResolver" ref="projectResolver" />

<constructor-arg name="storage"

ref="localTemporaryDeploymentsStorage" />

</bean>

To:

<bean id="ruleServiceLoader" class="org.openl.rules.ruleservice.loader.RuleServiceLoaderImpl">

<constructor-arg name="dataSource" ref="datasource" />

<constructor-arg name="projectResolver" ref="projectResolver" />

<constructor-arg name="storage"

ref="localTemporaryDeploymentsStorage" />

</bean>

3) Add following line to ruleservice.properties file:

ruleservice.logging.enabled = true

4) Change beans in rating-server-core-publisher-beans.xml

a) replace "deploymentAdmin" bean

Remove:

<bean id="deploymentAdmin" class="org.openl.ruleservice.publish.WebServicesDeploymentAdmin">

<property name="serverFactory" ref="serverPrototypeFactory" />

<property name="baseAddress" value="/" />

</bean>

Add:

<bean id="instantiationStrategyFactory"

class="org.openl.rules.ruleservice.publish.RuleServiceInstantiationStrategyFactoryImpl" />

 

<bean id="ruleServiceInstantiationFactory"

class="org.openl.rules.ruleservice.core.RuleServiceOpenLServiceInstantiationFactoryImpl">

<property name="instantiationStrategyFactory" ref="instantiationStrategyFactory" />

<!-- <property name="dependencyManager" ref="dependencyManager"></property> -->

<property name="ruleServiceLoader" ref="ruleServiceLoader" />

</bean>

b) change "rulesPublisher" bean

From:

<bean id="rulesPublisher" class="org.openl.rules.ruleservice.publish.RulesPublisher">

<property name="deploymentAdmin" ref="deploymentAdmin"/>

<property name="instantiationFactory" ref="instantiationFactory"/>

</bean>

To:

<bean id="ruleServicePublisher"

class="org.openl.rules.ruleservice.publish.WebServicesRuleServicePublisher">

<property name="serverFactory" ref="serverPrototypeFactory" />

<property name="baseAddress" value="/" />

</bean>

c)

From:

<bean id="loggingFeature" class="org.apache.cxf.feature.LoggingFeature">

<constructor-arg>

<util:constant static-field="java.lang.Integer.MAX_VALUE"/>

</constructor-arg>

</bean>

 

<bean id="serverPrototype" class="org.apache.cxf.frontend.ServerFactoryBean" scope="prototype">

<property name="dataBinding" ref="dataBinding" />

<property name="features">

<list>

<ref local="loggingFeature"/>

</list>

</property>

</bean>

To:

<bean id="loggingFeature" class="org.openl.rules.ruleservice.logging.LoggingFeature">

<property name="loggingEnabled" value="${ruleservice.logging.enabled}" />

</bean>

<bean id="serverPrototype" class="org.apache.cxf.frontend.ServerFactoryBean"

scope="prototype">

<property name="dataBinding" ref="dataBinding" />

<property name="features">

<list>

<!-- Comment/Uncomment following block for use/unuse logging feature.

It can increase performance if logging isn't used. -->

<ref local="loggingFeature" />

</list>

</property>

</bean>

5) API was changed.

a) Some classes was renamed.

b) Return types in some methods were changed.

© Copyright OpenL Tablets, 2004-2017