Hitachi Vantara Pentaho Community Wiki
Child pages
  • Creating and Editing an Action Sequence
Skip to end of metadata
Go to start of metadata

Choose the bi-developers folder within the file browser on the left side of the design studio. Then select the Pentaho Design Studio icon and choose "New Action Sequence". Name your action sequence (make sure it ends with ".xaction") and from the "Template" pull-down select "Sample Burst Action" and press the Finish button.

Templates are a great way to get a jump start on building action sequences. A good bit of the information is already filled in for you. All you have to do is fill in the blanks. Feel free to build your own reusable action sequences. When you're done, save them in the <eclipse install directory>/plugins/org.pentaho.designstudio.editors.actionsequence_x.x.x.x/templates directory. Next time you start the Action Sequence Wizard, your action sequence will be one of the available templates.

A burst report is a report that is run multiple times for multiple people. It is most useful if there is a parameter that will filter data specifically for each person. In this example, we do a query to get a list of managers, their email address and the region for which they are responsible. We loop through the result-set and generate a report filtered by the region. A personalized message is created and the report is emailed to the responsible manager.

On the general tab enter a title and description. Notice that the template we used didn't specify an icon. Let's assign one by clicking on the "Browse...", and selecting the bi-developers/bursting/BurstActionSequence.png file. Now choose File->Save and we'll move on.

Now press the "Define Process" tab. In brief this action sequence is going to run a report, then send a report to the each manager in the form of an attached Excel spreadsheet. Let's make a few changes. We'll send a second email to all our managers and let them all know how cool this action sequence stuff is.

In the Process Actions, tree right click on the "Email the report" action. Then select Add->Email. A new email action will be added as the last step in the loop, and the details of the newly created action will appear to the right of the tree. We want to send the email to the same managers that received the reports, we'll use the same email address used in the previous email action. Expand the "Lookup the region..." action in the Process Actions tree by clicking on the "+" sign next to the action. Now press and hold down the right mouse button over the "EMAIL" output listed under this action in the tree and drag the mouse over the field labeled "To" on the right hand side, then release the mouse button. A string labeled "<EMAIL>" should appear with the field indicating that the value of the "EMAIL" parameter will be used as the email destination. Let's fill in the "From" address by using the pull-down menu to the right of the "From" field and selecting "<from>". For the sake of example let's CC the email to some hard coded email address. Click in the CC field and type in the email address of your choice. Note that since this is occurring within a loop the person being CC'd will receive the same email for each manager in the loop. So make sure you CC it to someone you really want to annoy. Finally, type in the subject and text message of your choice. If you run this action sequence your newly created email action should send your email to the appropriate parties.

The point of this little exercise was to give you a taste of how you create your own actions within an action sequence and how to tie the outputs of one action to the inputs of a later action.

Some 'Gotchas' To Watch Out For

Here are some common things to check if your xaction decides to misbehave.

  • If you are attempting to send a .prpt report, be sure to check out this thread from the forums: - there is an example xaction there based off of one of the samples.
  • If you are getting an error regarding your JNDI database connection and all your connection parameters are correct, be sure you are not duplicating connections.  The server will not alert about this, but rather will claim that your database account is unable to connect.  It's important to note that any database connections created in the Pentaho Admin Console are JNDI connections.
  • Parameters in queries do not use the '${}' enclosure format like within Pentaho reports.  Use '{}' instead.
  • No labels