Home News (12/11/08)new Start Here Getting Started Downloads Documentation Tutorials (12/07/08)new Tablets Structure Deployment Web Studio OpenL Basics Constrainernew Change Log References LGPL License Motivational Reading OpenL Apologia |
Rule Service and Repository DemoThis is a full-functional demo that will show you how OpenL Web Studio, repository and runtime application work together. It is a complex demo that requires a careful following of the installation instructions.Logical ArchitectureThe architecture scheme is shown on the Figure 1
This figure shows a recommended architecture for OpenL Web Studio and runtime deployment. It consists of the following components: Actual ArchitectureFor the purposes of the demo OpenL Web Studio, Demo Web Application, and both repositories are deployed at the same instance of Tomcat application server. Rule EngineService starts as a separate java process.Deploying and running demo step-by-stepStep 1. Create Eclipse projectSelect Eclipse menu File | New | Project. Then select OpenL Tablets | Tools | Application Demo based on Tutorial 4.
Press Next and create a project named Step 2. Unpack demo files using Ant scriptThis demo project comes pre-packaged with all the files that are required for the web part of the demo. The installation of the demo is handled by the Ant scriptbuild.xml located in the project's root folder.
Before doing the next step make sure that a variable
Right-click on
Demo will be deployed into Step 3. Start Tomcat server and Rule Engine ServiceFirst start Tomcat and then Rule Service using different tasks frombuild.xml.
The order is important, because Rule Service is dependent on JCR repository deployed on Tomcat.
Tomcat start requires that System Variable JAVA_HOME have been set to jdk1.5-compatible environment.
If you have problems starting Tomcat open Step 4. Start simple Demo Web Application and check that is worksPoint browser to http://localhost:8080/demo and run the application. For example, if you enter age of the driver = 71 and gender = Male and press Execute button, the application will display Senior Driver
Step 5. Updating rules - Opening Web StudioThe following procedures will consist of multiple steps, here is a brief summary what is going to happen:
Now we can open Web Studio by clicking http://123.123.123.123:8080/webstudio.
You need to replace 123.123.123.123 with your server IP address, but you can not use Step 6. Updating Rules - Check-out the projectSwitch to Repository View by clicking on the Rules Repository icon .
Select the project
Switch to local workspace to edit project by clicking Open LWS in Web Studio icon
Step 7. Edit rules in Web StudioSelect Decision TableDriver-Eligibility/Driver Age Type and place cursor over the cell
containing 71+. After pop-up menu appears, click Edit.
In Table Editor change value to 75+ and click Save icon.
Step 8. Check-in the project into repositoryPress on Check-in icon .
Switch to the Repository View. Now you can see that the project has version 0.0.2
in the design-time repository.
Step 9. Deploy the project into runtime repositoryIn the Repository View press Smart Redeploy button. Smart Redeploy dialog will appear. Selecttutorial4 project and
press Deploy button.
The project is now deployed in runtime repository. Rule Service automatically reloads the deployed project. Now if we go back to our Demo Web Application and run query again we will see the different result:
Step 10. The last wordCongratulations!!! You have mastered the most complex OpenL Tablets demo to date, now it is time to relax and take another look at the picture at the beginning of this document to get another look at OpenL Tablets recommended architecture. Please don't forget to send us your feedback. |