Presentation is loading. Please wait.

Presentation is loading. Please wait.

EPM Customization Taking your Microsoft EPM Solution Beyond the “box” EPM Customization Series Part 2 November 21st, 2007 Brendan Giles, PMP, MCP.

Similar presentations


Presentation on theme: "EPM Customization Taking your Microsoft EPM Solution Beyond the “box” EPM Customization Series Part 2 November 21st, 2007 Brendan Giles, PMP, MCP."— Presentation transcript:

1 EPM Customization Taking your Microsoft EPM Solution Beyond the “box” EPM Customization Series Part 2 November 21st, 2007 Brendan Giles, PMP, MCP

2 Slide 2 Acronyms EPM Enterprise Project Management – Centralized control, Shared Resources, Portfolio / Project Reporting and tracking at the enterprise level. VBA Visual Basic for Applications programming language common to all Microsoft Office products including Microsoft Office Project. PDS Project Data Service – Project Server 2003 API. XML based request / reply. PSI Project Server Interface – Project Server 2007 API. Web services based using ADO datasets and the.NET Framework. SOAP Simple Object Access Protocol – Communication Protocol used to transfer data in a Microsoft EPM Solution via Http.

3 Slide 3 Overview Microsoft Office Project Data Model Microsoft Office Project VBA Project Data Service API (Microsoft EPM 2003) and Enterprise Data Maintenance Project Server Interface (Microsoft EPM 2007) Sharepoint Web Services Questions and Wrap-up

4 Slide 4 Project Object Model

5 Slide 5 VBA Benefits VBA allows: Access to Microsoft Office Project Objects Access to other Office Applications Macro recordings to expose VBA Code Key data elements: i. Project ii. Task iii. Task Time-Phased iv. Resource v. Resource Time-Phased vi. Assignment vii. Assignment Time-Phased

6 Slide 6 VBA Code Sub SavePlan(Share_Drive as String, Plan As String, SavedPlan As String) 'Retrieve the specified project plan from Project Server 'and save it to the fileshare FileOpen Name:="<>\" & Plan, ReadOnly:=True, _ FormatID:="MSProject.MPP", Openpool:=pjDoNotOpenPool 'Don't Try to update this project on the server when I save it to a fileshare 'besides it is read-only so it won't let you FileSaveAs Name:=Share_Drive + ":\Latest Project Plans\" & SavedPlan FileClose pjSave End Sub Techie Alert

7 Slide 7 VBA Retrieval of Assignments Time-Phased Data For Each Assignment In Resource.Assignments ' Check if assignment is within our report range If Assignment.Start <= EndOfPeriod _ And Assignment.Finish >= StartDate Then Set tsvs = Assignment.TimeScaleData(StartDate, EndOfPeriod, pjAssignmentTimescaledWork, pjTimescaleDays) Assignment_Remaining_Work_Hours = Assignment.RemainingWork / 60 For Each tsv In tsvs If tsv.Value <> "" Then Assignment_Work_Hours = tsv.Value / 60 'time is in mins ' Create a DBRecord Entry for this effort Add_DB_Assignment _ Project_Name:=Saved_Project_Name(prj.Name), _ Workgroup_Category:=Resource.EnterpriseOutlineCode4, _ Resource_Workgroup:=Resource.EnterpriseOutlineCode2, _ Resource_Name:=Resource.Name, _ Task_ID:=Assignment.TaskID, _ Task_Name:=Assignment.TaskName, _ Task_Start_Date:=tsv.StartDate, _ Task_Finish_Date:=tsv.EndDate, _ End If ' If tsv.value <>..... Next tsv End If ' If Assignment.Start <=..... Next Assignment Techie Alert

8 Slide 8 VBA also Allows Office Integration Set cnt = New ADODB.Connection With cnt.Open dbConnectStr 'Create the Assignments Table.Execute "CREATE TABLE Assignments_Table " & _ "([Assignment ID] COUNTER CONSTRAINT PrimaryKey PRIMARY KEY, " & _ "[Workgroup Category] Text(250) WITH Compression, " & _ "[Resource Workgroup] Text(250) WITH Compression, " & _ "[Resource Name] Text(250) WITH Compression, " & _ "[Project Name] Text(250) WITH Compression, " & _ "[Task ID] NUMBER, " & _ "[Task Name] Text(250) WITH Compression, " & _ "[Start Date] DATETIME, " & _ "[Finish Date] DATETIME, " & _ "[Assignment Remaining Work Hours] NUMBER, " & _ "[Assignment Remaining Work Days] NUMBER, " & _ "[Assignment Work Hours] NUMBER, " ' ' Create the Tasks Table '.Execute "CREATE TABLE Tasks_Table " & _ "([Task ID] NUMBER, " & _ "[Project Name] Text(250) WITH Compression, " & _ "[Task Name] Text(250), " & _ "[Start Date] DATETIME, " & _ "[Finish Date] DATETIME, " & _ "[Task Remaining Work Hours] NUMBER, " & _ "[Task Remaining Work Days] NUMBER, " & _ "[Task Work Hours] NUMBER, " ‘End With Set cnt = Nothing End Sub Techie Alert

9 Slide 9 VBA Object Model Changes VBA changes in Project Professional 2007 Simplified custom fields and outline codes Multiple undo and redo actions Effective calendar dates and calendar exceptions Advanced desktop reporting using Visual Reports Task drivers and recalculation change highlighting to help clarify scheduling processes Costs and budget Queuing Service events Importing of a Windows SharePoint Services 3.0 project Saving of a local copy of a Project Server project for sharing

10 Slide 10 Project Data Service Steps to access all PDS Methods Logon to Project Server Programmatically using valid ID and password Obtain Authentication Cookie Create a PDS Request in XML Call PDS Web Service with PDS Request and authentication Cookie via a SOAP call Receive PDS XML Reply Parse PDS XML Reply

11 Slide 11 PDS Authentication Cookie - 0 (F55A3……..

12 Slide 12 PDS Logon Cookie private void btnChkCookie_Click(object sender, System.EventArgs e) { // Create a persistent cookie for the URL, if the cookie doesn't // exist or if the Project Server URL changes. if (urlReset && ieCookiesOK) { CreateCookie(COOKIENAME, VALUENAME, txtMSPURL.Text, DAYSPERSIST); urlReset = false; } //Clear the listbox, for subsequent creations of the project list lblLogonStatus.Text = ""; psLogonUrl = txtMSPURL.Text + "/LgnIntAu.asp"; string textInReply = ""; if (Get_Cookie.LogonProjectServer(psLogonUrl, ref psCookie, ref textInReply)) { //Trace.Warn("Logon Okay"); lblLogonStatus.ForeColor = Color.Green; lblLogonStatus.Text = "Log on OK: " + txtMSPURL.Text; psURL = txtMSPURL.Text; //Check the PDS Call Here <----- } else { //Trace.Warn("Logon Failed"); //Trace.Warn(textInReply); lblLogonStatus.ForeColor = Color.Red; lblLogonStatus.Text = "Log on failed"; } Techie Alert

13 Slide 13 PSI Login via Web Service public bool LogonPS(bool useWinLogon, string baseUrl, string userName, string password) { const string LOGINWINDOWS = "_vti_bin/PSI/LoginWindows.asmx"; const string LOGINFORMS = "_vti_bin/PSI/LoginForms.asmx"; bool logonSucceeded = false; try { if (useWinLogon) { loginWindows.Url = baseUrl + LOGINWINDOWS; loginWindows.Credentials = CredentialCache.DefaultCredentials; if (loginWindows.Login()) logonSucceeded = true; } } // Catch statements return logonSucceeded; } Techie Alert

14 Slide 14 Project Data Service XML Based Request / Reply API Consists of: Project Methods Enterprise Project Creation Methods Resource Methods Enterprise Custom Field Methods Timesheet / Assignment Methods Administrative Methods Version Methods

15 Slide 15 Enterprise Data Maintenance Builds on the PDS to provide higher level data exchange Uses “file drop” and SOAP programmatic interface Adds a business layer mapping to integrate with existing Project server data Tightly integrates Project server with other line of business applications Resource data synchronization Project Team Synchronization Updating Custom field value lists

16 Slide 16 Microsoft EPM Solution 2003

17 Slide 17 Microsoft EPM Solution 2003

18 Slide 18 Microsoft EPM Solution 2007

19 Slide 19 Project Server Interface (PSI) Web Services API using ADO.NET Datasets Over 350 Public Methods Firewall Friendly (Ports 80 and 443) Access via SOAP over Http Managed Code but supports managed and unmanaged clients VB.NET, C#.NET and ASP.NET development Simply add a web reference (http://servername/projectservername/_vti_bin/psi/.. Better Design Time Control

20 Slide 20 Project Server Interface (PSI) Synchronous Methods aSynchronous (*Queue Methods) Bulk data changes Transactional / Restartable Over 100 Server Events to listen for ADO Datasets used for Data Transfer Typed datasets that are familiar to developers and provide safety Design Time Validation Improved Performance

21 Slide 21 Project Server Interface (PSI)

22 Slide 22 Project Server Interface (PSI)

23 Slide 23 Project Server Interface (PSI) A Wealth of Web Services: Admin Archive Authentication (Internal Use) Calendar Cube Admin Custom Fields Events Login Forms LoginWindows LookupTable Notifications ObjectLinkProvider Project PWA (Internal use) QueueSystem Resource Security Statusing Timesheet View (Internal Use) WinProj (Internal Use) WssInterop

24 Slide 24 Project Server Interface (PSI) Simply add a web reference in Visual Studio (http://servername/projectservername/_vti_bin/psi/resource.asmx

25 Slide 25 Project Server Interface (PSI) Simply add a web reference in Visual Studio (http://servername/projectservername/_vti_bin/psi/....

26 Slide 26 Project Server Interface (PSI) View Web Service Properties:

27 Slide 27 Project Server Interface (PSI) Expose the methods available ------ Retrieve data in an ADO Dataset PSI relies heavily on GUIDs (Globally Unique Identifier) in contrast to PDS that used IDs that were not always unique across Project Server Instances

28 Slide 28 Project Server Interface (PSI)

29 Slide 29 Project Server Events Applications can listen for Project Server Events

30 Slide 30 Project Server Events Applications can listen for Project Server Events

31 Slide 31 Project Server Interface (PSI) Developers should not directly Access Project Server Databases other than the Reporting Database PSI Web Services and methods should be used

32 Slide 32 Sharepoint Web Services Sharepoint Web Services give developers access to Sharepoint Sites and their content

33 Slide 33 Sharepoint Web Services Windows Sharepoint Services 3.0 for EPM 2007 Ships with Windows Server 2003.

34 Slide 34 Sharepoint Web Services Microsoft Office Sharepoint Server 2007 is recommended when using the workflow features of EPM 2007.

35 Slide 35 Sharepoint Web Services Project Web Access is now a Sharepoint Site in EPM 2007

36 Slide 36 Fetching Issues via a Sharepoint Web Service Techie Alert

37 Slide 37 Summary Customization of Microsoft EPM via: Visual Basic for Applications Project Data Services API (2003) Project Server Interface (API) (2007) Sharepoint Web Services Visual Studio ADO.NET 2.0.NET Framework

38 Slide 38 Questions and Answers ?? No such thing as a stupid question ?? Answers ---- we’ll try to have smart answers


Download ppt "EPM Customization Taking your Microsoft EPM Solution Beyond the “box” EPM Customization Series Part 2 November 21st, 2007 Brendan Giles, PMP, MCP."

Similar presentations


Ads by Google