Logo
programming4us
programming4us
programming4us
programming4us
Home
programming4us
XP
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server
programming4us
Windows Phone
 
Windows Server

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

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019
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
 
 
Top 10
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
 
programming4us
Windows Vista
programming4us
Windows 7
programming4us
Windows Azure
programming4us
Windows Server