Intro
N.B. If you are using the Bi Suite 3.5.x, please refer to the Troubleshooting section below first.
This guide will help you build and install the Echo plugin on your Pentaho BI Platform. The Echo plugin demonstrates many of the capabilities of BI Platform v2 plugins, mentioned in Developing Plugins. The plugin serves no useful purpose other than to show you how to leverage the extension points the plugin layer affords you. Echo plugin simply generates simple html content from it's various extensions. In particular, the Echo plugin includes:
- An Echo web service, that returns a simple message
- Content type registration of, and related content generation for, a new "xecho" solution file type
(You can then double-click files of type "xecho" in PUC and have the EchoConentGenerator present you with a simple html message) - An Echo BI Component (using new IAction API), which, again, returns a simple html message
This guide and the Echo plugin may be useful to you if you are looking to write your own BI Platform plugin or if you are just interested in understanding how a plugin could serve a need that you may have.
| Subfloor auto project creation script The subfloor framework, which Pentaho uses to build all new plugin projects, now has a nifty project creator script that can get you started with a skeleton plugin project quickly. Read more here. |
Prerequisites
The Echo plugin is an example of the features of the BI Platform plugin architecture, which exists in Pentaho BI Platform versions 2.1 and later. Due to the influx of features into the plugin layer, it is recommended that you use the latest version available to you when installing the Echo plugin.
You must download and install the latest BI Server from SourceForge. Pick the latest CITRUS release available. In order for the Echo BI Component to function, you must currently use the latest development build of the BI Server.
The instructions for installing the Echo plugin that follow assume that you have an installed and runnable BI Server.
You can download the source for this sample plugin at svn://source.pentaho.org/svnroot/platform-plugins/echo-plugin/trunk. This source will also be required for the instructions below.
Instructions
To deploy the Echo plugin you have two options, A) build and deploy from source or B) install from the echo-plugin zip
A) The following are instructions for how to get the Echo plugin source, build it, and deploy the plugin to your local BI Platform installation:
- Checkout the source from svn://source.pentaho.org/svnroot/platform-plugins/echo-plugin/trunk
- open build.properties in the echo-plugin dir and edit the "pentaho.dir" path to point to your Pentaho platform install directory
- run "ant" to build the plugin, then "ant install" to deploy it to your platform install
- start (or restart) your BI Server
B) Below are the instructions for how to install a preconstructed echo plugin zip package:
- Download the latest Echo plugin zip package
- unzip the echo-plugin-*.zip in your BI Platform system solutions folder. Typically this will be <pentaho.dir>/pentaho-solutions/system
- start (or restart) your BI Server
Results
The "install" ant task should have unzipped your plugin contents to <pentaho.dir>/pentaho-solutions/system/echo-plugin. You should check that a lib and resources dir are present there. This confirms that the plugin was installed correctly.
Once the plugin is installed, you can view the various extensions of the plugin.
First let's take a look at the Echo web service.
In PUC, go to Tools->Web Services in the PUC menu bar to view the web service WSDL and service url for the new Echo Service. You can take the service URL and append an operation such as "now" to the end of it and execute it via http, e.g.: http://<machine:port>/pentaho/content/ws-run/EchoService/now
Next, in the PUC solutions browser, go to BI Developer Examples/EchoPlugin and you will see a new content type that our plugin has specified, namely the "xecho" content type. You will see a file called "sample.xecho" with a custom icon which the Echo plugin has also configured. If you double-click or right click and select "Run", the EchoContentGenerator will be invoked and will serve content relevant to the "xecho" content type.
Finally, in the BI Developer Examples/EchoPlugin folder of the PUC solution browswer, you will also see an action sequence called "Echo". This action sequence has only one action definition, and that is to execute the EchoComponent. The EchoComponent is a Java Bean class that drives a Action (new lightweight BI Component). The EchoComponent's only job is to return a string, which you will see if you double click or run the Echo action sequence.
Troubleshooting
BI-Server 3.5.x need specific version of the EchoPlugin build to work correctly:
The EchoPlugin to use for 3.5.x can be found here (build #9): EchoPlugin for 3.5.x
Sources for this version can be found here: svn://source.pentaho.org/svnroot/bi-platform-v2/tags/3.5.0-GA/bi-platform-plugins/echo-plugin
Related Items
- For more documentation on developing your own plugin, see Developing Plugins
- For a list of available plugins, see Plugin Depot
- The source for Echo plugin is avialable at svn://source.pentaho.org/svnroot/bi-platform-v2/trunk/bi-platform-plugins/echo-plugin
- Some doc on Actions: Creating Actions
- Project home page for subfloor, the ant-based build and packaging layer used in this project