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
- Sharepoint 2013 : SharePoint Designer 2013 (part 1) - New Features
- Sharepoint 2013 : Health Monitoring and Disaster Recovery - SharePoint Farm Design
- Fine-Tuning MDT Deployments : Working with the MDT Database (part 3) - Filling the MDT Database Using PowerShell
- Managing Client Protection : User Account Control (part 3) - UAC Virtualization, UAC and Startup Programs, Compatibility Problems with UAC
- Microsoft Excel 2010 : Calculating the Mode (part 2) - Getting the Mode of Categories with a Formula - Using an Array Formula to Count the Values
- Microsoft Exchange Server 2007 : Implementing Client Access and Hub Transport Servers - Transport Pipeline
- Microsoft SharePoint 2013 : Working with Visio Services - Designing dashboards - Data linking (part 1) - Obtaining external data
- What's new and improved in SharePoint 2013 : Using the Office Store
- Deploying Applications Using Group Policy and SCCM 2007 : Deploying Applications Using SCCM 2007 (part 2)
- Microsoft Project 2010 : Linking Tasks (part 1) - Defining Dependency Links
Top 10
- Configuring and Troubleshooting IPv6 in Windows Vista (part 4) - Troubleshooting IPv6 Connectivity
- Configuring and Troubleshooting IPv6 in Windows Vista (part 3) - Configuring IPv6 in Windows Vista Using Netsh , Other IPv6 Configuration Tasks
- Configuring and Troubleshooting IPv6 in Windows Vista (part 2) - Configuring IPv6 in Windows Vista Using the User Interface
- Configuring and Troubleshooting IPv6 in Windows Vista (part 1) - Displaying IPv6 Address Settings
- Deploying IPv6 : IPv6 Enhancements in Windows Vista
- Games and Windows 7 : Games for Windows - LIVE (part 2) - Accessing Games for Windows - LIVE from within Compatible Games
- Games and Windows 7 : Games for Windows - LIVE (part 1) - Using the Games for Windows - LIVE Marketplace
- Sharepoint 2013 : Client-side Programming - Working with the REST API (part 3)
- Sharepoint 2013 : Client-side Programming - Working with the REST API (part 2) - Working with the REST API in JavaScript
- Sharepoint 2013 : Client-side Programming - Working with the REST API (part 1) - Understanding REST fundamentals
 
 
Windows XP
Windows Vista
Windows 7
Windows Azure
Windows Server
Windows Phone
2015 Camaro