Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

You configure a system action by adding information about the action sequence to the <system-action> node of the pentaho.xml file. For instance, if your action sequence is called usernameToRegion.xaction, it exists in the repository under samples/filters, you want the action sequence to run when the user logs in, with the output placed in session scope, and you want the output of the action sequence to be available in a portlet, you would write this xml element:

Code Block
xml
xml
<org.pentaho.ui.portlet.PentahoPortletSession scope="session">
   samples/filters/usernameToRegion.xaction
</org.pentaho.ui.portlet.PentahoPortletSession>

and place it inside the <system-action> node in the pentaho.xml file. <TODO: link to mat's doc about the pentaho.xml file> As . As another example, suppose your action sequence is called setCompanyName.xaction, it exists in the repository under samples/filters, you want the action sequence to run when the system starts up with the output placed in global scope, and you want the output of the action sequence to be available in a Servlet/jsp, you would write this xml element:

Code Block

<org.pentaho.core.session.PentahoHttpSession scope="global">
   samples/filters/setCompanyName.xaction
</org.pentaho.core.session.PentahoHttpSession>

Let's break it down a bit using the previous example. We make the output of the action sequence available to portlets by creating the XML element <org.pentaho.ui.portlet

...

.PentahoHttpSession>. We make the output available in global scope by adding the scope="global" attribute to our element. And we identify the name and location of our action sequence by adding samples/filters/setCompanyName.xaction

...

as a child text node of our xml element.
Your pentaho.xml file would look something like this:

Code Block
xml
xml
<pentaho-system>
   ...
   <system-actions>
      <org.pentaho.ui.portlet.PentahoPortletSession scope="session">
         samples/filters/usernameToRegion.xaction
      </org.pentaho.ui.portlet.PentahoPortletSession>
      <org.pentaho.uicore.portletsession.PentahoHttpSession scope="global">
         samples/filters/setCompanyName.xaction
      </org.pentaho.uicore.portlet. PentahoHttpSession >session.PentahoHttpSession>
   </system-actions>
   ...
</pentaho-system>

...