PDA

View Full Version : Passing Parameters to an external URL



wattyler
10-01-2006, 05:45 AM
Hi,

I am a total newbie to Pentaho, so please excuse me if my question seems a bit stupid. I am currently developing an application that brings together data from many different enterprise applications by using a web based GIS map browser. By clicking on a point on a map, a dashboard is displayed showing a list of links that can be drilled into to retrieve information from the various systems. Some of these applications are legacy-based, so that it is required to design new reports using jdbc connections, and calling jasperreports, jfreechart etc. Other systems are service based, or have existing report written within the application or by using a reporting tool such as BO WEBI. Currently my dashboard is coded in jsp with calls to various java classes to provide functionality. Pentaho would seem to be seems to be an ideal application to glue these requirements together, and replace my dashboard. The workflow functionality seems great for gathering information from different applications, and then passing it on to the relevant reporting function for displaying to the user. My simple problem is this- there doesn’t seem to be a documented action just to pass a set of parameters to a URL. I have tried the following and it works ok, but as it is undocumented I’m not sure if this will disappear with the next release. Am I missing something here, is there a better way to do this, or is this functionality missing?. Many thanks for a great product.


<?xml version="1.0" encoding="UTF-8"?>
<action-sequence>
<title>Call external page</title>
<version>1</version>
<logging-level>ERROR</logging-level>
<documentation>
<author>Watt Tyler</author>
<description>call a page on another site by passing a set of url parameters</description>
<help>Is this correct?</help>
<result-type/>
<icon>|folder.png</icon>
</documentation>

<inputs>
<myparam type="string">
<sources>
<request>myparam</request>
</sources>
</myparam>
</inputs>

<outputs>
<newurl type="string">
<destinations>
<response>redirect</response>
</destinations>
</newurl>
</outputs>

<resources/>

<actions>
<action-definition>
<component-name>JavascriptRule</component-name>
<action-type>JavaScript</action-type>
<action-inputs>
<myparam type="string"/>
</action-inputs>
<action-outputs>
<newurl type="string"/>
</action-outputs>
<component-definition>
<script><![CDATA[newurl ="http://www.mysite.process.jsp?myparam=" + param;]]></script>
</component-definition>
</action-definition>

</actions>
</action-sequence>

wattyler
10-16-2006, 05:35 AM
I had a quick go at knocking up my own component to do this, and was impressed how easy it turned out to be. I have enclosed a simple example that can be used to perform a google query based on data passed from an input. The code is a little rough but it should be enough to get someone started.


edit : woops.. should have used a StringBuffer. trying to use too many languages in the same day!

Regards http://forums.pentaho.org/archived_att/files/049ab57e7943ce6c8705f9266d76db78.zip

Post edited by: wattyler, at: 2006/10/16 09:44

jdixon
10-19-2006, 08:45 AM
Hi wattyler,

Both approaches will work well. The first way you tried it is part of the product and we have no plans to change it.

Have a look at the Google Maps intgration we did in RC3. You can see a demo of this click here (http://www.pentaho.com/products/demos/) or download RC3.

James

jdixon
10-19-2006, 08:45 AM
Hi wattyler,

Both approaches will work well. The first way you tried it is part of the product and we have no plans to change it.

Have a look at the Google Maps intgration we did in RC3. You can see a demo of this click here (http://www.pentaho.com/products/demos/) or download RC3.

James