Hitachi Vantara Pentaho Community Wiki

02 - Executing an Action Sequence

Skip to end of metadata
Go to start of metadata

There are several ways to execute a solution; via Design Studio, URL, Java Code or a Web Service call.

Design Studio

Click on the test tab on the HelloWorld.xaction editor. At the top of the test page, there is a field titled "Pentaho Server URL." If your pentaho server is running, enter the URL to your Pentaho BI Server which is likely to be http://localhost:8080/pentaho if you are running the PCI. Click the "Test Server" button and verify that you see the top level samples page displayed on the test page. Click on "Run" to execute the HelloWorld Action Sequence. You should see the familiar "Hello World. Greetings from the Pentaho BI Platform." message. In the unlikely event that you are not able to not see the Hello World message, make sure the server is running and that you typed the Server URL correctly. Verify that you can run the samples from your browser. If all else fails, try checking the Design Studio forum at www.pentaho.org.

URL

The samples that come with the preconfigured install are launched via URL using the ViewAction (org.pentaho.ui.servlet.ViewAction) servlet. The following URL will launch the HelloWorld Action Sequence:

http://localhost:8080/pentaho/ViewAction?&solution=samples&path=getting-started&action=HelloWorld.xaction

The result returned depends on the Action Sequence Document. You may get a report to view, a text message or just "Action Successful." The following parameters can be entered on the URL:

    • solution, path, action* - The location of the Action Sequence document to load.
    • instance_id* - The instance Id of a previous Runtime Context
    • debug* - set to "true" in order to have debug information written to the execution log.

Web Service Call

In the "Settings and Services" group of the samples that come with the preconfigured install is a Web Service Example. It is still a URL call, this time to the servlet ServiceAction (org.pentaho.ui.servlet.HttpWebService). The following URL will launch the HelloWorld Action Sequence:

http://localhost:8080/pentaho/ServiceAction?solution=samples&path=getting-started&action=HelloWorld.xaction

In this case, the result returned is an XML SOAP Response. The following parameters can be entered on the URL:

    • solution, path, action* - The location of the Action Sequence document to load.
    • instance_id* - The instance Id of a previous Runtime Context
    • debug* - set to "true" in order to have debug information written to the execution log.

Java Call

An Action Sequence can be executed directly from a Java application. For an example of how to do this, open the Java file "org.pentaho.test.RuntimeTest.java" and look at the JUnit test for HelloWorld. This class code can be found by accessing the Pentaho public repository at svn://source.pentaho.org/svnroot.

Action Sequence Recap

The inputs, outputs and resources in the Action Sequence header define a contract between the Action Sequence and the outside world. The Sequence requires the specified inputs and resources to be passed in and will return the specified outputs.

The action-definition defines a contract between each component and the Action Sequence. The action-inputs and action-resources define the parameters that a component requires to execute. The action-outputs define what parameters will be available after the component completes executing. Outputs from one component can be used as inputs to another component. The mapping attribute of the action-inputs allow outputs from one component that have different names to be used as inputs to another component.

Specifying the input/output relationships and their data types allows the system to validate an Action Sequence or set of Action Sequences without actually executing the components. A complete solution can be validated and "locked down" to prevent modification of the Action Sequence documents and eliminate errors due to "broken links" between these documents.

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.
  1. Jan 16, 2008

    Anonymous says:

    I'm using the 1.6 GA  release of the PCI, and apparently logging in is now ...

    I'm using the 1.6 GA  release of the PCI, and apparently logging in is now mandatory.  Until you've logged in, all you will see is the login prompt when you press the "Test Server" or "Run" buttons in the Design Studio.

    Fortunately, it's easy enough to log in from inside Design Studio: Just pick one of the valid users from the dropdown list and sign in. After that, you'll be able to run action sequences as described in this wiki page--at least, it works for me.

  2. Mar 28, 2013

    Meherun Nessa says:

    The Design Studio crashes when I run HelloWorld.xaction. Probably mcAffee antivi...

    The Design Studio crashes when I run HelloWorld.xaction. Probably mcAffee antivirus is doing this. No solution is found yet.

  3. Jul 06, 2013

    andrew decarlo says:

    Where is the RuntimeTest.java class? I have been looking through all the folders...

    Where is the RuntimeTest.java class? I have been looking through all the folders at svn://source.pentaho.org/svnroot and cannot find it, is this class deprecated? If so, is there any updated documentation? Examples on using the pentaho-actionssequence-dom project would be spectacular as well.