Logo
Windows XP
Windows Vista
Windows 7
Windows Azure
Windows Server
Windows Phone
PREGNANCY
 
 
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
- Microsoft Excel 2010 : Protecting and Securing a Workbook - Protecting a Worksheet - Apply a Password to a Worksheet
- Windows Server 2008 R2 file and print services : Administering Distributed File System Services (part 2) - Configuring and administering DFS Replication
- System Center Configuration Manager 2007 : Operating System Deployment - Task Sequences (part 2) - Tasks
- Microsoft SharePoint 2013 : Looking at Visio Services (part 2) - Adding a Visio Web Access Web Part to a page
- Games and Windows 7 : Using the Games Explorer (part 2) - Customizing Games Explorer
- Collaborating Within an Exchange Environment Using Microsoft Office SharePoint Server 2007 : Exploring End-User Features in MOSS
- Microsoft Lync Server 2013 : Deploying Lync Online - Configuring Dial-in Conferencing, Configuring Lync Properties for User Accounts
- Games and Windows 7 : Using the Games Explorer (part 4) - Managing Your Game Controllers and Other Game-Related Hardware
- Microsoft Access 2010 : Creating a New Table Using Application Parts, Setting a Primary Key
- Understanding Network Services and Active Directory Domain Controller Placement for Exchange Server 2007 : Examining DNS Components
Top 10
- Windows Server 2012 : Administering Active Directory using Windows PowerShell (part 3) - Performing an advanced Active Directory administration task
- Windows Server 2012 : Administering Active Directory using Windows PowerShell (part 2) - Finding Active Directory administration cmdlets
- Windows Server 2012 : Administering Active Directory using Windows PowerShell (part 1) - Managing user accounts with Windows PowerShell
- Windows Server 2012 : Enabling advanced features using ADAC (part 3) - Creating fine-grained password policies
- Windows Server 2012 : Enabling advanced features using ADAC (part 2) - Configuring fine-grained password policies
- Windows Server 2012 : Enabling advanced features using ADAC (part 1) - Enabling and using the Active Directory Recycle Bin
- Microsoft Excel 2010 : Protecting and Securing a Workbook - Marking a Workbook as Read-Only
- Microsoft Excel 2010 : Protecting and Securing a Workbook - Working with Office Safe Modes
- Microsoft Excel 2010 : Protecting and Securing a Workbook - Setting External Content Security Options
- Microsoft Excel 2010 : Protecting and Securing a Workbook - Setting Privacy Options - Set Parental Controls for Online Research
 
 
Windows XP
Windows Vista
Windows 7
Windows Azure
Windows Server
Windows Phone
2015 Camaro