...
Your pentaho.xml file would look something like this:
Code Block | |||||||
---|---|---|---|---|---|---|---|
| |||||||
<beans> <bean id="sessionStartupActionsList" class="java.util.ArrayList"> <constructor-arg> <list> <bean class="org.pentaho.platform.engine.core.system.SessionStartupAction"> <property name="sessionType" value=""/> <property name="actionPath" value=""/> <property name="actionOutputScope" value=""/> </bean> <!-- ...other session startup actions... --> <bean class="org.pentaho.platform.engine.core.system.SessionStartupAction"> <property name="sessionType" value=""/> <property name="actionPath" value=""/> <property name="actionOutputScope" value=""/> </bean> </list> </constructor-arg> </bean> </beans> |
...
Specify the Result Set Name as RS_MANAGERS_REGION
. And make sure Keep Connection Open is unchecked. The values from the result set will be available to us in our next action.
...
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 "heavy" result set to in our session. We only need the string from the result set with the region name. 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:
...