Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: Passing Parameters to an external URL

  1. #1
    Join Date
    Sep 2006
    Posts
    10

    Default Passing Parameters to an external URL

    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.

    Code:
    <?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>

  2. #2
    Join Date
    Sep 2006
    Posts
    10

    Default Re:Passing Parameters to an external URL : Sol

    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_a...266d76db78.zip

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

  3. #3
    jdixon Guest

    Default Re:Passing Parameters to an external URL : Sol

    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 or download RC3.

    James

  4. #4
    jdixon Guest

    Default Re:Passing Parameters to an external URL : Sol

    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 or download RC3.

    James

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.