Versions Compared

Key

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

...

A system action is simply an action sequence that is configured to run either at system start time (i.e. when the application server starts) or session start time (i.e. when the user logs in). The output of a system action is available to other action sequences as input parameters. System actions are configured by adding the appropriate child elements to the <system-action> element in the pentaho.xml file.

---------------------- - what to do with this junk? - ------------

Info
titleWhat is session and global scope?

TODO

...

Next, in the action sequence editor, add an input called name to the Process Inputs tree control. Configure it to be of type string, and define its scope to be session.

When the user logs into the BI Platform, the platform places a parameter called name into the session scope. name is the user name that was used to log into the platform. We can get access to this parameter by defining it as an input to our action sequence.

...

Info
titleWhat does "Keep Connections Open" mean?

If Keep Connections Open is not checked, when a Relational action runs a database query, it immediately stores the results of the query into a light-weight java object, and closes the connection to the database. This light-weight java object can be stored as a parameter in request, session or global scope. This makes the object available to other actions in this action sequence, and to other action sequences executing at another time.
Often however, the size of a result is very large, making it expensive to copy the contents into a light-weight java object. It is also expensive to have both objects in memory at the same time. In this case, it makes sense to have "Keep Connections Open" checked. The result will not be copied to a light-weight java object, and other actions in this action sequence will have direct access to the result set. In addition, the connection being used by the result set is kept open.
In all cases, the connection to the database is closed at the conclusion of the action sequence. This suggests that a result set that was created with "Keep Connections Open" checked should never be placed in session or global scope, since the result set's connection will be closed at conclusion of the current action sequence, making it unusable.


We now have the name of the region that the manager is responsible for, but it is still in the result set. We don't want to keep the relatively large result set in our user session when all we really need is just a simple string. We can use another JavaScript action to get the region string out of our result set, and then store the region string into our session. 
In the Process Actions tree control, click on the Add control and select Generate Data From -> JavaScript.  
Since we need access to the result set from the previous action, in the Scripts Input, click on the Add control and select RS_MANAGERS_REGION. 
Next, add the following code in the JavaScript editor:

...