Thursday, January 3, 2013

Action Framework and Conditions


Using the OBIEE 11g Action Framework, I can define actions in the web catalog that can launch additional reports, display web pages or guide the user down a particular analysis path. What’s new in this release is that I can also link out to business applications, triggering workflow, invoking business processes and generally giving the user the ability to take actions within the BI tool based on what they are seeing. This interaction with business processes is something I looked at a couple of years ago in an article on OTN called “Integrating Oracle Business Intelligence Enterprise Edition with SOA”, but that was all hand-coded and hacked together whilst the Action Framework is a fully productized, supported feature of the 11g release. So how does this new feature work?
Let’s start with a simple analysis on regional performance, showing a list of regions and performance to target:
Sshot-1-16
This analysis will be provided to managers through a dashboard, and I’d like them to be able to take some action based on its contents. Specifically:
  • I’d like them to be able to drill to a detail-level report on a particular region, showing sales broken down by stores (and if appropriate, concessions), and by the staff working in them
  • For those stores under-performing (defined as performance to target less than 100%), I’d like to provide a link to the store scorecard
  • I’d also like to provide a link to the company website, passing across the region name as a parameter, to show more details on the region
  • I’d also like to be able to trigger a workflow process to arrange a performance review, for those regional managers whose regions are underperforming
  • Finally, I’d like to put a link under the report to point to the store scorecard if any regions are underperforming
(not much then…)
I start by creating the detail-level analysis that I want this initial analysis to link to. I include two hierarchical columns, one for the Stores dimension and one for the Staff dimension, and also put an Is Prompted filter on the Region Name column, so that it can be filtered on the Region Name that the user clicks on in the original analysis (as you would do when setting up request navigation in 10g).
Sshot-3-17
Next is where the “action” comes in. Using the Home Page in the OBIEE 11g Unified Framework, I navigate to the Create …area, find the Actionable Intelligence section and then click on Action, and then select Navigate to BI Content as the action type.
Sshot-4-15
I then use the Browse dialog that then comes up to navigate to the analysis I want to link to, and then save the action to the web catalog for use later on.
Sshot-5-15
I then repeat this for the action that will navigate to the store performance scorecard, again selecting it from the web catalog. Once this is done, it’s time to create another action, this time to link to the company website.
I do this by creating another action, but this time selecting Navigate to a Web Page as the action type.
Sshot-6-14
When creating this type of action, I can specify the parameters that the website expects, which will be mapped to columns in the analysis criteria when I add the action to it.
Sshot-7-15
It’s similar process when I create the action that links to the application. In this case, I’m going to invoke a web service method that will trigger the human workflow (specifically, requesting that a regional manager goes into HQ for an interview.). I do this by in this case, selecting the Invoke a Web Service option from the Invoke menu in the new Action dialog, which lets me select between web services that have been registered by the OBIEE admin in one of the configuration files.
Sshot-8-13
Finally, I want to set up an action that will sit under this analysis on the dashboard, and also link through to the scorecard if any regions are performing below target. I already have the action (I can reuse the one from before), but I need to define a condition that will determine whether it’s displayed. To do this, I select New > Condition from the common Header area of the Unified Framework, like this:
Sshot-2-16
I then select the request that will test for this condition – basically, the original request with a filter on it to only return rows where performance to target is under 100% – and decide how many rows need to be returned for the condition to be met.
Sshot-19-4
Now I’m good to go. Taking a look at the Catalog view in the Unified Framework, I can see a list of all the actions, and the condition, that I’ve created in this session.
Sshot-10-11
Now I can go back to the original analysis, and start adding the actions. I do this by initially selecting the Criteria tab in Answers, and then select Column Properties > Interaction for the Region Name column. Then, I add the action to navigate to the scorecard, but set it up so that it only displays if that row’s performance to target measure is below 100%.
Sshot-11-12
After this, I add the action that links out to the more detailed analysis, and Answers will take care of passing the Region Name parameter to the second report, as it did with request navigation in 10g. Once this is done, I add the action to bring up the company web page, and map the Region Name column in the analysis to the parameter in the action.
Sshot-12-12
Then, I add the action that invokes the web service and again, make this conditional on performance to target being less than 100%. I’m now at the point where all of the actions are defined for the analysis, and I can view the list of them before saving the changes.
Sshot-13-9
I can now test out the actions. I display a preview of the analysis and click on the first of the regions, one that is performing above target. I just get presented with two of the actions, as the other two only kick-in when performance is below target.
Sshot-14-6
When I click on the second one though, the other two actions are displayed, as the condition for the action has been met.
Sshot-15-6
Finally, I want to publish this analysis to my dashboard, and then use the condition I defined earlier along with the Navigate to Scorecard action to add a conditional message under it. Once I’ve added the analysis to the dashboard, see how on the left-hand side there are new dashboard elements for Action Link and Action Link Menu? These replace the Guided Analytics Link item that you used to get with 10g, and I drag the Action Link item onto the dashboard, into the same section as my analysis.
Sshot-17-4
Then, when I display the analysis in the dashboard, I’ve got an action link (aka guided analytics link) under it, conditionally displayed if one or more regions are under-performing against target.
Sshot-20-1
So there you have it. Tomorrow we’ll be taking a break from OBIEE 11g to look at the new 11g release of ODI, before we finish up our coverage of the OBIEE 11g launch announcements with looks at scaleout and HA, and the new release of BI Publisher.