Thursday, 4 September 2014

PeopleCode Variable Scope Quiz

***UPDATE.  Question 4 was not clear. Now fixed (hat tip Banksy)

I recently wrote a little quiz for some PeopleSoft developer friends of mine on PeopleCode Variable Scoping.  It's not comprehensive and it may not even be accurate.  It's offered to the PeopleSoft community as a thought provoking item for both new and hardcore PeopleCode developers.

There's only 7 questions.

Please feel free to leave comments, new insights, corrections or other helpful witty banter.


Wednesday, 3 September 2014

PeopleSoft Performance Monitor Archiving Performance Issue

I love the PeopleSoft Performance Monitor (PPM).  

Some of the benefits of logging all production and development transactions include


  • Diagnosing application issues for which the end user didn't provide enough information when they reported a problem.  With PPM you can see exactly what they did and when.
  • Profiling who is using your system, how much and what they're using.  This can help focus on developing improvements on parts of the system that are used most.
  • Troubleshooting performance problems.  Even in standard logging mode you can easily get reports on slow components, slow queries, etc.
  • Discovering the profile of transactions during development phase.  The precise load on your PeopleSoft systems can be quickly determined by looking at the entire PMU tree.  For example it helps answer the question of what really happens to your web and application servers when a particular user with 10 pagelets in their homepage logs into the system.


At Oxfam we log every transaction and retain 5 days of history before archiving.  On a busy system you can easily clock up millions of rows of data in PSPMTRANSHIST before arching runs and this can expose a severe performance problem during the archive process.

In  App Engine PSPM_ARCHIVE section ARCHIVE.ARCPCODE there is a function ArchiveTransactions.  This functions identifies ALL the rows to be archived using datetime based critieria and opens a SQL object &TransHistSQL.  Depending on number of rows in PSPMTRANSHIST, number of rows not being archived, power of your DB server this SELECT can take from a few seconds to hours!  The code then iteratively fetches rows from &TransHistSQL until either there are no rows left or the number of rows fetched = the &NumTransInBatch (which for Oracle and SQL Server databases is 1,000, DB2 = 500 and Informix and Sybase = 300).

If the open of &TransHistSQL takes a long time and you have millions of rows then the whole archiving process may take days to finish.  

A quick and dirty fix to this is to modify the open SELECT statement to only return the number of rows that it's going to archive in a batch.  I've used the TOP n operator in Microsoft SQL Server for this BUT THIS WON'T WORK WITH ORACLE.  I think Oracle users will need to add new criteria something like WHERE ROWNUM <= &NumTransInBatch .  After all, why open a cursor on millions of rows when you're only going to process 1,000 of them?  

I've marked in red the new code for SQL Server.  For us ,at Oxfam, this improved performance of archiving from 50 mins per batch to 2 seconds.

/*-- SELECT THE ROWS FROM PSPMTRANSHIST ELIGLIBLE FOR ARCHIVING */
   &TransHistSQL.Open("SELECT TOP " | &NumTransInBatch | " X.PM_INSTANCE_ID, X.PM_TRANS_DEFN_SET, X.PM_TRANS_DEFN_ID, X.PM_AGENTID, X.PM_TRANS_STATUS, X.OPRID, X.PM_PERF_TRACE, X.PM_CONTEXT_VALUE1, X.PM_CONTEXT_VALUE2, X.PM_CONTEXT_VALUE3, X.PM_CONTEXTID_1, X.PM_CONTEXTID_2, X.PM_CONTEXTID_3, X.PM_PROCESS_ID, %DateTimeOut(X.PM_AGENT_STRT_DTTM), %DateTimeOut(X.PM_MON_STRT_DTTM), X.PM_TRANS_DURATION, X.PM_PARENT_INST_ID, X.PM_TOP_INST_ID, X.PM_METRIC_VALUE1, X.PM_METRIC_VALUE2, X.PM_METRIC_VALUE3, X.PM_METRIC_VALUE4, X.PM_METRIC_VALUE5, X.PM_METRIC_VALUE6, X.PM_METRIC_VALUE7, X.PM_ADDTNL_DESCR, Z.PM_ARCHIVE_MODE FROM PSPMTRANSHIST X, PSPMAGENT Y, PSPMSYSDEFN Z WHERE X.PM_AGENTID=Y.PM_AGENTID AND Y.PM_SYSTEMID=Z.PM_SYSTEMID AND (Z.PM_ARCHIVE_MODE='1' OR Z.PM_ARCHIVE_MODE='2') AND %DateTimeDiff(X.PM_MON_STRT_DTTM, %CurrentDateTimeIn) >= (PM_MAX_HIST_AGE * 24 * 60)");





Monday, 28 July 2014

UKOUG APPS14 Conference




The UK Oracle User Group APPS2014 Conference  -   2 days of PeopleSoft presentations  -  meet senior PeopleSoft executives  - great networking opportunities  -  at the ACC Liverpool

PeopleSoft Apps days are 9 &10 December 2014




I'm giving a very practical presentation on some of the things you can do with the PeopleSoft Portal.  Every PeopleSoft application has the PeopleSoft Portal embedded... it's what you see when you first login.  How does it work? What can you do with it?  Come and join the discussion on Tuesday 9th at 13:30.  




Friday, 16 May 2014

South Sudan Crisis

Many of my friends and colleagues in the Oracle and PeopleSoft world know that I work for Oxfam.  I've talked many times about how PeopleSoft applications support Oxfam's worldwide project management, finance and supply chain logistics systems.




This time I'd like to highlight the human crisis in South Sudan.  

Read more from Oxfam.org.uk

"Since conflict broke out in December 2013,thousands have died, and more than 800,000 people have been displaced within South Sudan, with a further 300,000 fleeing to neighbouring countries. In total, nearly 3.7 million people need urgent humanitarian support now.

Many have lost everything they own and are living in some of the worst conditions imaginable. Our teams on the ground report acute shortages of clean drinking water and a lack of health facilities and basic sanitation, creating a growing public health risk to both displaced people and the communities hosting them.
Without a huge and sustained international relief effort, the situation is set to deteriorate further. More than 200,000 children are already suffering severe acute malnutrition, and an estimated 7 million people - well over half of the population - risk not having enough to eat in the months ahead.
Families forced from their homes have had to leave the crops and animals they depend on for food and income. Most were not able to plant crops, so there will be no harvest in the coming months and no food stored to see them through next year."

Thursday, 17 April 2014

IE11, PeopleTools 8.53 and Compatibility Mode

*** #3 ARTICLE UPDATE*** 21 July 2014
Included in PeopleTools patch 8.53.14 was a resolution to bug 18531267 which "Adds IE11 support to Javascript".  This fix relates to JavaScript which detects browser versions.  From IE11 the user agent string uses the browser engine name "Trident" and not the usual "MSIE" of previous versions.  See here http://msdn.microsoft.com/en-us/library/ie/bg182625%28v=vs.85%29.aspx#uaString

*** #2 ARTICLE UPDATE*** 4 June 2014

Tech Update - PeopleSoft Certified with Internet Explorer 11 (Doc ID 1672394.1)

https://support.oracle.com/epmos/faces/DocContentDisplay?id=1672394.1

"May 14, 2014.  Internet Explorer 11 is now certified with PeopleTools 8.53.  The minimum patch level supported with IE 11 is PT 8.53.11.  The certification can be found in the certification database on My Oracle Support (MOS).  PeopleTools 8.52 has been certified as well, with PT 8.52.22 being the minimum supported level."


My interpretation of this is that IE11 is now certified in standard mode with 8.53.11 and 8.52.22.  Running in compatibility mode is not required.

*** #1 ARTICLE UPDATE*** 7 May 2014

I'm trying to obtain confirmation of this from the Oracle Platforms Team but according to a MOS analyst there is now support for running IE10 and IE11 in Standard Mode if you're on Patch 11 of PeopleTools 8.53.  What this means (I believe) is that from Patch 11 all the necessary "X-UA-Compatible" directives have now been included in the response headers.


According to Oracle Certifications Database Microsoft IE11 is supported on PeopleTools 8.53.


However, according to the PeopleTools 8.48 - 8.53 Browser Compatibility Guide (Doc ID 704492.1) - Page 34 - IE10 (ten) MUST be run in Compatibility Mode.  There is no statement anywhere that I can see about what mode to run IE11 in.

So, what's this all about. Some things I know.... some things I'm learning about..... some things I take an educated guess on and others I have cases open with My Oracle Support.

Please feel free to correct, comment or add to my discussion here.

What is Compatibility Mode


compatibility mode is a software mechanism in which a software emulates an older version of software in order to allow obsolete software or files to remain compatible with the computer's newer hardware or software.

What does this mean for Internet Explorer?


Internet Explorer 8 was promoted by Microsoft as having stricter adherence to W3Cdescribed web standards than Internet Explorer 7. As a result, as in every IE version before it, some percentage of web pages coded to the behavior of the older versions would break in IE8. This would have been a repetition of the situation with IE7 which, while having fixed bugs from IE6, broke pages that used the IE6-specific hacks to work around its non-compliance. This was especially a problem for offline HTML documents, which may not be updatable (e.g. stored on a read-only medium, such as a CD-ROM or DVD-ROM).
To avoid this situation, IE8 implements a form of version targeting whereby a page could be authored to a specific version of a browser using the X-UA-Compatibledeclaration either as a meta element or in the HTTP headers.[1]
In order to maintain backwards compatibility, sites can opt-into IE7-like handling of content by inserting a specially created meta element into the web page that triggers the "Compatibility mode" in the browser, using:[2]
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
A newer version of the browser than the page was coded for would emulate the behavior of the older version, so that the assumptions the page made about the browser's behavior holds true.

What does this mean for PeopleSoft?

If you use a version of PeopleTools that has support for IE8 or IE9 and you use one of these browsers then the browser must be set to run in Standards Mode.  See Pages 36 and 38 of Doc ID 704492.1.




If you use a version of PeopleTools that has support for IE10 or IE11 and you use one of these browsers then the browser must be set to run in Compatibility Mode.


What are some of the effects of using compatibility mode?

A number of things occur when running in compatibility mode.

1) some html and JavaScript hacks written by PeopleSoft to work around the non-compliance of standards by older versions of IE are supported under compatibility mode in new version of IE.
2) running in compatibility mode may also result in the older, slower and less efficient JavaScript engine being used.  This is why we see much slower rendering of complex or large pages even in the supposedly faster IE11 browser compared to to say Google Chrome or FireFox.

Taking a Closer Look at 8.53 HTTP Responses

Using Fiddler (free from Telerik) to capture and examine http responses from PeopleSoft to IE10 and IE11 we can see that some (but not all) responses from POST method requests contain the X-UA-Compatible: IE=8 or X-UA-Compatible: IE=EmulateIE8 directives in the http header.  This instructs the browser to render the page using compatibility mode.



So why then do we also need to set the browser to be in compatibility mode if the pages themselves from PeopleSoft are instructing the browser to be in compatibility mode?

My guess is that not all responses contain this directive and specifically AJAX calls that return html fragments do not generally contain this directive.  This looks like a work in progress by the PeopleSoft developers and hence because not all responses instruct the browser to run in compatibility mode we have to set the browser to process all responses from PeopleSoft in compatibility mode.

There is a difference between IE10 and IE11 here.  Far fewer http responses contain the compatibility directive in IE11 then in IE10.  It seems to be that only responses from psp servlet contain the directive in IE11.  It's possible that the portal header instructs the browser and therefore anything rendered in the content frame is also run in compatibility mode.  It's also possible that when PeopleTools identifies the browser being used on signin that it knows that IE11 has improved support for older style HTML and JavaScript and so the compatibility directive is not required.  I am not 100% certain of this but it is my best guess with what I've observed.  If anyone has greater insight into this then I'd value your input.

How to set IE10 and IE11 to run in Compatibility Mode?

In IE10 and IE11 under the Tools|Compatibility View Settings menu you can add specific web servers to a list of sites to run in compatibility mode.

In IE11 you can also enable Enterprise Mode which gives greater flexibility in specifying servers and also centralised control over deployment.   See here for more details http://technet.microsoft.com/library/dn640687.aspx

The Bottom Line

This is all very technically interesting but the bottom line is that if you're using IE10 or IE11 with 8.53 then you should enable compatibility mode.  


PeopleSoft 9.2 Upgrade Insights from Oxfam GB

At the recent UKOUG PeopleSoft Roadshow I presented some thoughts and experiences on a major FSCM 9.2 upgrade project that I'm working on at Oxfam GB.

If you're a member of UKOUG then you can download my presentation from UKOUG site here http://www.ukoug.org/2014-events/emea-peoplesoft-roadshow-2014/agenda/upgrading-to-peoplesoft-92-practical-insights/ along with a link to the SQL script to report all customised objects in your database.

If you're not a member (and you should be if you're in the UK) then links to the PowerPoint and SQL script are below.


PowerPoint http://goo.gl/axrn7o

SQL Script http://goo.gl/gFjNs4

Happy Upgrading and Happy Easter!


Wednesday, 26 March 2014

UKOUG PeopleSoft Roadshow 2014

What a great day of networking with PeopleSoft customers, partners and Oracle staff.  If you're in the UK and are involved in using PeopleSoft as an end user, developer, administrator or analyst then don't miss next years roadshow event.

The two Oracle speakers, Marc Weintraub (PeopleSoft Product Strategy) and Jeff Robbins (PeopleTools Strategy) gave some useful sessions on PeopleSoft application and PeopleTools roadmap.  I'll post more on what they told us about 8.54 when I get some more time.  Until then take a look at Jeff demonstrating the new PeopleSoft user interface "FLuiD" available in 8.54 sometime later this year.


Marc spent time covering the message that PeopleSoft is "State Of The Art" and this description can apply to software that is over two decades old.   More on this when I have time too.  


----------------------------------------------------------------------------------

And finally...... here's some news that's interesting on Oracle Secure Enterprise Search.  http://www.oracle.com/technetwork/search/oses/overview/index.html