Logo
PREGNANCY
Windows XP
Windows Vista
Windows 7
Windows Azure
Windows Server
Windows Phone
 
 
Windows Server

SharePoint 2010 PerformancePoint Services : Working with the Monitoring API - Working with PPS Objects

5/17/2011 11:22:24 AM
You can create, read, update, and delete PPS objects through the SDK by calling into a web service, named the BIMonitoringAuthoringService, through a class available in the Microsoft.PerformancePoint.Scorecards.Client.dll named BIMonitoringAuthoringServiceProxy. This class contains static methods that can locate and instantiate an IBIMonitoringAuthoring object that enable interaction with the web service.

Caution

Technically you can call the web service directly without the help of the client-side assemblies, but the Web Service Description Language (WSDL) document that ships with PPS 2010 does not completely match the implementation. You need to either modify the WSDL or acquire an updated one from an alternative source.


To prepare your Visual Studio project, first add a reference to Microsoft.PerformancePoint.Scorecards.Client.dll. Then include the following using statement at the top of any file:

using Microsoft.PerformancePoint.Scorecards;

The web service calls are accomplished by creating an instance of a BIMonitoringAuthoringServiceProxy object and calling methods from the instance. In this code sample, we connect to the BIMonitoringAuthoringService from the root site collection. We then retrieve all the objects from a PPS Content list named PerformancePoint Content and print out their name and their content type designation:

string WebServiceUrl = "http://servername/_vti_bin/PPSAuthoringService.asmx";
string ListRelativeUrl = "/Lists/PerformancePoint Content";
IBIMonitoringAuthoring cService =
BIMonitoringAuthoringServiceProxy.CreateInstance(WebServiceUrl);
FirstClassElementCollection allFCOs = cService.GetListItems(ListRelativeUrl);
foreach (FirstClassElement oneFCO in allFCOs)
Console.WriteLine (oneFCO.Name + " of type " + oneFCO.ContentType);


This technique is useful when creating PPS objects, too. Often, it is not clear exactly what properties need to be set for an object to be usable in a dashboard or in Dashboard Designer. You can discover this information by creating objects through Dashboard Designer and then querying the object for properties in Visual Studio.

Creating Indicator Example

In the following example, we create an indicator that extends the built-in Stoplight indicator to change the default text color to purple:

  • A GUID will be automatically assigned to the object upon saving to the SharePoint content list.

  • Some indicator functionality is contained in a different namespace, so it is necessary to add this using a statement to the top of your coding file.

       using Microsoft.PerformancePoint.Scorecards.Indicators;
  • There is a special NoDataIndicatorBand that must be defined for each indicator created.

  • In this example, we just copy the existing bands from a built-in indicator (the Stoplight pattern). You can create or customize your own indicator bands. The number of bands for an indicator is dynamically set by the number of bands added to the IndicatorBands collection of the Indicator object.

       Indicator indicator = new Indicator();
    indicator.Name.Text = "My Indicator";
    indicator.IndicatorType = IndicatorType.Standard;
    Indicator stoplightIndicator = Indicators.BuiltinIndicators.Indicators.
    First(s => s.Name.Text == "Stoplight");
    indicator.NoDataIndicatorBand = stoplightIndicator.NoDataIndicatorBand;
    foreach( IndicatorBand oneBand in stoplightIndicator.IndicatorBands )
    {
    oneBand.Color = "#800080";
    indicator.IndicatorBands.Add(oneBand);
    }
    indicator.Validate();
    IBIMonitoringAuthoring cService = BIMonitoringAuthoringService
    Proxy.CreateInstance(WebServiceUrl);
    cService.CreateIndicator(ListRelativeUrl, indicator);

Updating Custom Properties on KPIs

In the following example, we modify all KPIs in a specific content list to add a custom property that can then display on a scorecard. This code adds a single hyperlink property named Web Site Link to all KPIs and then saves the KPIs back to the server one by one:

IBIMonitoringAuthoring cService = BIMonitoringAuthoringService
Proxy.CreateInstance(WebServiceUrl);
FirstClassElementCollection allFCOs = cService.GetListItems(ListRelativeUrl);
foreach (Kpi kpi in allFCOs.Where(fco => fco.ContentType == FCOContentType.PpsKpi) )
{
BpmPropertyHyperlink newHyperlinkProperty = new BpmPropertyHyperlink();
newHyperlinkProperty.Hyperlink = "http://www.bing.com";
newHyperlinkProperty.DisplayName = "Web site link";
newHyperlinkProperty.UniqueName = Guid.NewGuid().ToString();
kpi.Properties.Add(newHyperlinkProperty);
cService.UpdateKpi(kpi);
}


Other -----------------
- BizTalk 2010 Recipes : EDI Solutions - Subscribing to EDI Promoted Properties
- BizTalk 2010 Recipes : EDI Solutions - Creating Custom EDI Pipelines
- Monitoring Exchange Server 2010 : Monitoring Mail Flow (part 3) - Managing Messages
- Monitoring Exchange Server 2010 : Monitoring Mail Flow (part 2) - Monitoring Transport Queues
- Monitoring Exchange Server 2010 : Monitoring Mail Flow (part 1) - Configuring Message Tracking
- BizTalk 2010 Recipes : EDI Solutions - Configuring EDI Validation with Pipelines
- BizTalk 2010 Recipes : EDI Solutions - Configuring Automatic Acknowledgements
- Windows Server 2003 : Planning a Backup Strategy
- Windows Server 2003 : Monitoring Network Servers
- Monitoring Exchange Server 2010 : Monitoring Exchange Databases (part 2) - Monitoring DAGs
- Monitoring Exchange Server 2010 : Monitoring Exchange Databases (part 1) - Monitoring Exchange Database Information and Statistics
- Exchange Server 2010 : Configuring Transport Servers - Edge Transport Servers
- BizTalk 2010 Recipes : EDI Solutions - Configuring an EDI Envelope
- BizTalk 2010 Recipes : EDI Solutions - Creating and Configuring a Trading Partner
- SharePoint 2010 PerformancePoint Services : Working with the Monitoring API - Setting Up Your Development Environment
- SharePoint 2010 PerformancePoint Services : Installing SharePoint on a Client Operating System
- Exchange Server 2010 : Configuring Transport Servers - Hub Transport Servers (part 2)
- Exchange Server 2010 : Configuring Transport Servers - Hub Transport Servers (part 1)
- BizTalk 2010 Recipes : EDI Solutions - Defining Complex Mappings in External XSLT
- BizTalk 2010 Recipes : EDI Solutions - Creating an EDI Map
 
 
Most view of day
- System Center Configuration Manager 2007 : Operating System Install Packages and Image Packages (part 2) - Manual Image Creation, Image Deployment
- Microsoft Exchange Server 2007 : Implementing Client Access and Hub Transport Servers - Understanding the Hub Transport Server
- Managing Windows 7 : Creating a Linked Online ID, Managing Travel Settings
- Games and Windows 7 : Using the Games Explorer (part 3) - Rating Your System's Performance
- SharePoint 2010 and PowerShell: Real-World Solutions : Automate a SharePoint 2010 Installation
- Using Voice and Sounds : Customizing Speech Recognition, Talking to the Mouse
- Microsoft Word 2010 : Creating Desktop Publishing Documents - Adding Desktop Publishing Effects
- Windows Phone 8 : Configuring Basic Device Settings - Providing Feedback
- Maintaining Windows 7 : Restore Backed-Up Files
- Sharepoint 2013 : The Office JavaScript Object Model (part 2) - Functional Capabilities by Office Client,Mailbox-based Apps
Top 10
- Windows Server 2012 : Configuring IPsec (part 7) - Configuring connection security rules - Monitoring IPsec
- Windows Server 2012 : Configuring IPsec (part 6) - Configuring connection security rules - Creating a custom rule, Configuring authenticated bypass
- Windows Server 2012 : Configuring IPsec (part 5) - Configuring connection security rules - Creating an authentication exemption rule, Creating a server-to-server rule, Creating a tunnel rule
- Windows Server 2012 : Configuring IPsec (part 4) - Configuring connection security rules - Types of connection security rules, Creating an isolation rule
- Windows Server 2012 : Configuring IPsec (part 3) - Configuring IPsec settings - Customizing IPsec tunnel authorizations, Configuring IPsec settings using Windows PowerShell
- Windows Server 2012 : Configuring IPsec (part 2) - Configuring IPsec settings - Customizing IPsec defaults
- Windows Server 2012 : Configuring IPsec (part 1) - Understanding connection security
- Microsoft Project 2010 : Linking Tasks (part 8) - Auditing Task Links,Using the Task Inspector
- Microsoft Project 2010 : Linking Tasks (part 7) - Creating Links by Using the Mouse,Working with Automatic Linking Options
- Microsoft Project 2010 : Linking Tasks (part 6) - Creating Links by Using the Entry Table
 
 
Windows XP
Windows Vista
Windows 7
Windows Azure
Windows Server
Windows Phone
2015 Camaro