Baama
Baama

Reputation: 2642

Pentaho 5.0.1 CE Adding folder to pentaho-solutions directory

How do I get a folder to appear in the browser after adding it to \pentaho-solutions in Pentaho 5.0.1 CE. The documentation I read does not seem to work with this new version.

1. Create a new directory in /pentaho/server/biserver-ee/pentaho-solutions/.
Use underscores instead of spaces in the solution directory name. Ensure that the directory has the appropriate user
and group ownership to be writable from the BI Platform.
2. Using an XML-aware text editor (or Design Studio), create a file named index.xmlin your new solution directory.
3. Copy the following text into the index.xml file, changing the content accordingly:
***<index>
<name>Example Solution</name>
<description>This solution contains examples I created while learning to
work with action sequences.</description>
<icon></icon>
<visible>true</visible>
<display-type>icons</display-type>
</index>***
4. Save the file and close the text editor.
5. Log into the Pentaho User Console as an administrator.
6. Refresh the solution repository cache by going to the Toolsmenu, then selecting the Refreshsubmenu, then
clicking on Repository Cache.
You now have a new solution directory. It will show up in all file dialogues in the Pentaho User Console as well as the
Solution Browser in the left pane.
Every time you add or edit an action sequence to your solution directory, you must refresh the repository cache as
explained above. Each user currently logged into the Pentaho User Console must also refresh their session cache; this
is best done by re-logging into the Pentaho User Console.

I am using Pentaho design studio to develop an xaction sequence script. I followed this procedure:

1. In Design Studio, go to the Filemenu, then select New, and click on Other...in the sub-menu.
The Newwindow will appear.
2. In the Newwindow, click the triangle next to Pentaho, select New Action Sequence Wizard, then click Next.
3. In the File namefield, type hello_world.xaction.
4. Select Hello Worldfrom the Templatedrop-down box, then click Finish.
The wizard will generate the new file and bring you back to the workbench.
5. Click on HelloWorldComponentin the Process Actionssection on the left.
The right side of the screen will change to show the options available for this action: Nameand Message. The
Name field controls the name of the component in the Process Actions list on the left; it doesn't do anything else of
note. The Message field contains the text that will appear on the screen when the action sequence is run. It is prepopulated with %quote, which is a token that represents a quote message in a nonexistent properties file. Pentaho
used to provide properties files for each example, but they have been removed from the standard Pentaho Business
Analytics distribution.
6. Replace the %quotewith a sufficiently inspiring message.
Alternatively, you could create a hello_world.propertiesfile and populate it with the appropriate messages and
tokens, but that has no advantage unless you intend to internationalize this action sequence.
7. Save the file.
You now have a working action sequence that prints a short text message: "Hello, World." plus whatever you typed into
the Message field. The first part of the message is determined by a message bundle packaged with the Pentaho Web
application archive.

To test the action sequence, use the Test tab if you are on Windows or OS X, or log into the Pentaho User Console and
run it from the Solution Browser.

Running the sample xaction fails with

Sorry. We really did try.
Something went wrong. Please try again
or contact your administrator.

I figure this is because pentaho cannot locate the xaction file as specified in the file path when I generate the url from within design studio. The folder I created within the solution directory does not appear in the browser directory list despite refreshing the cache. Any help?

Upvotes: 0

Views: 4369

Answers (3)

Paulo Fernandes
Paulo Fernandes

Reputation: 11

Sorry for getting back to this question some time later, just in case someone searches something related to Pentaho repositories management with no success, i hope this information can help.

Just to make things more clear, i'm using version 5.2.x and i'm supposing you want to create a new folder on the root directory of Browse Files screen, something that is not allowed on Pentaho5 CE Web Console.

The answers about repository management based on JackRabbit are correct, so the old way we used to configure new "solutions" folders doesn't work anymore. From version 5 on, Pentaho exposes an interesting REST api that allows you doing things not allowed in web console.

For instance, for creating a folder in root directory you should create a http REST PUT request against Pentaho Server (using tools like curl or if you appreciate Google Chrome, something like Advanced Rest Client, etc.) using the following URL: http://localhost:8080/pentaho/api/repo/dirs/:new_directory_name?userid=admin&password=password

Pentaho repository directory REST api is documented here: http://javadoc.pentaho.com/bi-platform500/webservice500/resource_DirectoryResource.html

It's worthy to spend some time reading REST API the documentation.

Upvotes: 0

user1485267
user1485267

Reputation: 1335

I did mistake after starting biserver 5.2. Unexpectedly i deleted Public folder after configuring to jackrabbit. Now how do i create the folder so that i can see Public and Home Folders.

Upvotes: 0

Michael Christopher
Michael Christopher

Reputation: 501

With Version 5 the files and folders are no longer stored in "/pentaho/server/biserver-ee/pentaho-solutions/..." It is stored now in a jackrabbit repository.

You can create folders and upload files in the user console.

Upvotes: 3

Related Questions