Click to edit Master subtitle style CLICK TO EDIT MASTER OPTION 1 Advanced Mariner Configuration A...

Post on 28-Mar-2015

214 views 0 download

Tags:

Transcript of Click to edit Master subtitle style CLICK TO EDIT MASTER OPTION 1 Advanced Mariner Configuration A...

Click to edit Master subtitle style

CLICK TO EDIT MASTER OPTION 1Advanced Mariner ConfigurationA Case Study from WMS Gaming

Larry SteinPrincipal Systems Engineer

WMS Gaming

2

Agenda

Introductions

The Challenge – breaking away from Excel

The Search – finding the “right” tool

The Solution – how Mariner fit the bill

What We Did – customizing Mariner

How We Did It – examples of customizations

3

• Established: 1992• Annual Sales: $650m (and growing!)

• Employees: 1500+• Locations: 16 worldwide

WMS – Leader in Casino Gaming Technology

WMS, WMS Gaming are trademarks or registered trademarks of WMS Gaming Inc.

TOP GUN™ & © Paramount Pictures Corporation

One of the world’s leading manufacturers and suppliers of casino slot machines

with an unmatched reputation for innovative game design and

development. Our portfolio includes many of the industry’s most popular and profitable branded casino slots and state-

of-the-art gaming technologies.

4

About You!

• Your name and title• Your company• Are you using Mariner currently?

– Version 6 or 2008?– How long?

• Have you used JavaScript to customize Mariner?• Why are you here today?

Chris Baker
Let's narrow to one or two questions at beginning and one question at the end

5

Breaking Away From Excel

The Challenge

6

The Challenge

• Managing 100-150 product development projects simultaneously

• A single shared Excel spreadsheet• Multiple dates in a single cell• Strikeouts and color used as change indicators• Separate spreadsheet to track project slippage and Root

Cause• Manual process for Root Cause Analysis

7

What’s Wrong with Excel?

• Excel spreadsheet is report• Single-threaded updates• No calculations• No sorting, grouping, or filtering• No Root Cause capture• Limited date change history

• Manual bold and blue • Manual shading• No process enforcement• Limited number of fields• No other formats• No actual reports

8

The SearchFinding the “Right” Tool

9

The Search

• We needed a solution that would:– Maintain or improve current process– Reproduce current Milestone Report– Allow simultaneous project updates– Capture date changes with Root Cause– Provide date calculation capabilities– Support custom screens and functionality– Include custom reporting– Manage more than just project milestones – Support phase-in of added capabilities– Integrate with other systems

10

The SolutionHow Mariner Fit the Bill

11

The Solution

• Multi-user project management• Centralized project information• Flexible reporting• Using Mariner’s custom JavaScript capability:

– Project milestone dates are calculated using standard durations

– When dates change, downstream dates can be automatically re-calculated

– Enforced capture of Root Cause for every date change– A Custom Log View (the “Change Log”) records change

information for later analysis

12

The Solution (cont’d)

• The Milestone Report:– Automatically identifies dates that have

changed– Allows selection of project investments– Allows sorting of project investments– Produced in real-time– Available to everyone

• The Root Cause Analysis Report:– Available as a Mariner Custom Report– Allows selection of date range

13

What We Did

Customizing Mariner to Implement the Solution

14

Customization Summary

Two Views for each Project Investment TypeAuto-calculate Baseline and Plan dimensionsAuto-copy of Baseline to Plan dimensionAuto-populate of Prior Forecast when Plan is changedRed/Yellow/Green indicators for specific milestonesCustom Log View for date changes with Root CauseMilestone Report (replaces Excel)Root Cause Analysis Report (replaces Crystal) Slippage Analysis Report (new, still manual)

15

New Project Investment View

16

Automatic Calculations

JavaScript code uses standard durations to calculate Baseline dates.

JavaScript code uses standard durations to calculate Baseline dates.

17

Automatic Copy of Dimensions

JavaScript code copies from the Baseline dimension to the Plan dimension for each date.

18

Project Summary View

Calculate Forecast Dates button

Baseline and Prior Forecast dimensions are read-only

Red/Yellow/ Green indicators

Root Cause list and comment.

19

Changing a Forecast Date

Changes to Current Forecast date(s) automatically update Prior Forecast date(s).

20

Calculate Forecast Dates

JavaScript re-calculates downstream Current Forecast dates after one or more is changed, starting from last changed.

21

Select a Root Cause

Root Cause must be selected before any changes to dates can be saved.

22

The Change Log

Every Current Forecast date change is recorded in the Change Log.

Additional information is saved with every record to allow for tracking of slippage.

23

Sample Change Log Items

24

Milestone Report View

• The “Milestone Report” View in the Investments module:• Displays the Milestone Report menu• Single “iFrame” control

25

Better Than Excel?

• Online, real-time reporting• Simultaneous updates in Mariner• Can be sorted, grouped and filtered• Additional report fields

• Auto blue and bold• Auto shading• Exportable

Portfolio Report

Grouped by Program

Portfolio Report

Grouped by Program

26

The New Slippage Analysis Report

• SQL Reporting Services reads the Custom Log View to create the Root Cause Analysis in Mariner

27

How We Did It

JavaScript Examples

28

JavaScript in Mariner

• JavaScript in Views includes:– Global scripting– Event-based scripting

• Can access the values of attributes in Views• Supports modification and enhancement of built-in Mariner

functionality• Provides access to internal Mariner functions using RPC

(Remote Procedure Calls)• Provides access to Web Services using HTTP (HyperText

Transfer Protocol)

29

Global JavaScript

• JavaScript code attached to a View using the Script button is “global.”• Supports creation of a standard library of JavaScript functions that can

be attached to and referenced by any Investment View. • Our JavaScript library includes 15 functions with over 1500 lines of code

30

Event-based JavaScript

• Adds JavaScript to Events for Attributes and Controls on Views

• Can set the value of Attribute(s) when the value of another Attribute changes

• Can initialize the value(s) of Attribute(s) when the View is loaded

• JavaScript in Events is local to the View

31

Event Types

• Examples of events that are triggered when certain actions are taken by the user:

– onchange – when the value of an attribute changes

– onreadystate – when an attribute is initially displayed in a View

– onselectionchange – when a list selection changes

– onclick – when the user clicks the left mouse button on an attribute

32

View Initialization

Use “onreadystate” event of attributes for JavaScript initialization code.

33

Initialize View Attributes

• Assign attribute IDs to JavaScript variables and then call global JavaScript function to store values

• Attached to “onreadystate” event of lowest View attribute

34

Reset “Dirty” State

var ctl = window.document.getElementById(event.srcElement.id);

ctl.SelectedIndex = 0;

// remove the dirty bit when we change the root cause during load:

if( window.View && window.View.ViewManager && window.View.ViewManager.SetBasePageDirty)

window.View.ViewManager.SetBasePageDirty(false);

• Attach to “onreadystate” event of attribute whose value is being set• Causes Mariner to ignore that this value has been changed• Mariner will not prompt to save Investment if user makes no other

changes

35

Using Hidden Attributes

Additional Mariner attributes are :• Defined for each milestone and dimension to be tracked• Part of every project investment type• Placed on the relevant Summary Views• Hidden to end-users (under Project Milestones group box)• “Highest changed” attribute tracks last changed milestone

36

Setting the Date Change Value

• When a date is changed, JavaScript code in the “onchange” event:

– Sets “Highest Changed Milestone” attribute for date re-calculation

– Calls global function to save current value

var tmpHighestChanged = window.document.getElementById("ctl1195066648885").Value;

if (tmpHighestChanged == undefined){ window.document.getElementById("ctl1195066648885").Value = “3";} else if (tmpHighestChanged < 3) { window.document.getElementById("ctl1195066648885").Value = “3";}

recordFldChange(event.srcElement.id);

37

Attaching Function to View Event

• Besides attributes and controls, Views also have Events• JavaScript function is attached to View “onbeforesave”

event at end of global JavaScript library• Saves date changes to the Change Log View when the user

clicks OK or Save

if (window.View){

window.View.attachEvent("onbeforesave", saveFieldChanges);}

38

Save to Change Log using RPCfunction RecordChangeLogRecord(inName, inRoot, inComment, inMSname, inMSPF, inMSCF, inISBL, inPM, inTNum) {

var cRPCSaveNewObject = "<Function unmanagedResponse=\"true\" name=\"SaveNewObject\">"+ "<Parameter name=\"parentUID\" type=\"System.String\"></Parameter>"+ "<Parameter name=\"objectTypeId\" type=\"System.Int32\"></Parameter>"+ "<Parameter name=\"payload\" type=\"System.String\"></Parameter>"+ "</Function>";

var summaryViewRPC = new PESXmlRpcUtility(applicationRoot + "RPC/SummarViewRPC.aspx");

// build the xml payloadvar summaryFormXml;

summaryFormXml = '<Root><Name dirty="true"><Universal>' + inName + '</Universal></Name>'+'<RootCauseReason dirty="true"><Universal>' + inRoot + '</Universal></RootCauseReason>'+ '<RootCauseComments dirty="true"><Universal>' + inComment + '</Universal></RootCauseComments>'+ '<Milestone-Name dirty="true"><Universal>' + inMSname + '</Universal></Milestone-Name>'+ '<chglogMilestonePF dirty="true"><Universal>' + inMSPF + '</Universal></chglogMilestonePF>'+ '<chglogMilestoneCF dirty="true"><Universal>' + inMSCF + '</Universal></chglogMilestoneCF>'+ '<chglogInitSubBL dirty="true"><Universal>' + inISBL + '</Universal></chglogInitSubBL>'+ '<ProjectManager dirty="true"><Universal>' + inPM + '</Universal></ProjectManager>'+ '<chglogProjectID dirty="true"><Universal>' + inTNum + '</Universal></chglogProjectID>'+ '</Root>';

var xmldoc = summaryViewRPC.ExecuteRpc(cRPCSaveNewObject, window.Framework.CurrentObjectID, 36, summaryFormXml);

}

39

function CalculateForecastDates(){ // Get the index of the highest milestone date changed so we only recalculate dates // from that milestone forward. var highestChanged = window.document.getElementById(fldHighestChangedID).Value;

// Reset the milestone index. window.document.getElementById(fldHighestChangedID).Value = "0";

var urlMS; var key = 1; var changeIdx = 2;

while (key < calcNumFields) { if (highestChanged < changeIdx) { if (window.document.getElementById(fldDurationFromIDs[key]).Value !== null) { urlMS = "/MarinerDateCalc/calcDates.aspx?timeframe=" + durArray[fldDurationSelectorIdxs[key]] + "&startdate=" + window.document.getElementById(fldDurationFromIDs[key]).Value; getMS(urlMS, CF_fld_IDs[key]); } } key++; changeIdx++; }highestChanged = "0";

Calculate Forecast (Plan) Dates

40

Accept Baseline Dates

window.document.getElementById("ctl1196369048034").Value = window.document.getElementById("ctl1196368794947").Value;

.

.

.

It is easy to copy a value from one attribute to another using JavaScript.

41

Get Time Using Web Services

var url = "/MarinerDateCalc/calcDates.aspx?current=yes";

function handleHttpResponse() { if (http.readyState == 4) curTime = http.responseText;}

function getCurrentTime() { http.open("GET", url, false); http.onreadystatechange = handleHttpResponse; http.send(null);}

42

MathML to Subtract Dates

<?xml version="1.0" encoding="utf-16"?><Calculation> <Expression className="Serena.Consulting.Custom.DateMath.SubtractDates, Serena.Consulting.Custom.DateMath"> </Expression> <RHSVariable name="ContractDate.Plan" identifier="Date1"></RHSVariable> <RHSVariable name="RTL1.Plan" identifier="Date2"></RHSVariable></Calculation>

43

MathML for Red/Yellow/Green

<Calculation> <Expression> <math xmlns:mathml="http://www.w3.org/1998/Math/MathML"> <lambda> <bvar> <ci>DaysDifference</ci> </bvar> <bvar> <ci>ContractDate</ci> </bvar> <bvar> <ci>RTLDate</ci> </bvar> <bvar> <ci>Red</ci> </bvar> <bvar> <ci>Yellow</ci> </bvar> <bvar> <ci>Green</ci> </bvar>

<piecewise> <piece> <ci>Red</ci> <apply> <geq /> <ci>RTLDate</ci> <ci>ContractDate</ci> </apply> </piece> <piece> <ci>Yellow</ci> <apply> <leq /> <ci>DaysDifference</ci> <cn>7</cn> </apply> </piece> <otherwise> <ci>Green</ci> </otherwise> </piecewise> </lambda> </math> </Expression> <RHSVariable name="Contract-RTL1-Days-Diff" identifier="DaysDifference"></RHSVariable> <RHSVariable name="ContractDate.Plan" identifier="ContractDate"></RHSVariable> <RHSVariable name="RTL1.Plan" identifier="RTLDate"></RHSVariable> <RHSVariable name="%ListItem%ProjectStatus.Red.1%" identifier="Red"></RHSVariable> <RHSVariable name="%ListItem%ProjectStatus.Yellow.1%" identifier="Yellow"></RHSVariable> <RHSVariable name="%ListItem%ProjectStatus.Green.1%" identifier="Green"></RHSVariable></Calculation>

44

Global JavaScript Functions

• resetChangeControlArrays – called by the “onreadystate” event of the Modified By attribute when a View is loaded. Initializes all of the control IDs into arrays for tracking date changes and performing date calculations.

• recordFldChange – saves the new value of a Current Forecast date and updates the Prior Forecast in the View with the old value of the Current Forecast date

• recordFldChangeActual – saves the new value of an Actual date• saveFieldChanges – loops through the View looking for changed dates and calls

RecordChangeLogRecord to write out Change Log records• RecordChangeLogRecord – uses RPC to write records to the Change Log• handleHttpResponse – called by getCurrentTime to set a JavaScript variable to the

value returned by a web services call• getCurrentTime – uses web services to call an aspx page to return the current time• getHTTPObject – creates a web services object to be used in web services calls• handleHttpResponseMS – called by getMS to return the value of a date at some

duration in the future• getMS – uses web services to call an aspx page to calculate a new date based on a

starting date and duration• CalculateForecastDates – called by the “onclick” event of the “Calculate Forecast

Dates” button. Loops through a View, calling getMS to calculate new downstream dates when a date was changed.

45

• Will you try JavaScript?

Quick Feedback

Chris Baker
Placeholder for another nTag survey

46

Answers For Your Questions