Search This Blog

Tuesday, October 20, 2015

Handy File Attachment Utilities To Consider

Couple of utilities that provides more flexibility to the attachment framework.

1. Restricting the File Type for the upload
This utility allows you to create a filter for the type of documents which are allowed for the upload. This provides more control for the File Attachment Framework and less worry on the malicious file uploads to the system.

The file type list can be created from the below page. There are two options which can be used here.

  • Relative: The system allows the file types which are in the Contained Extensions grid and with the status of Accept
  • Absolute: To utilize the standard list of file types (available file types given below). You can pick any file type from the standard list and exclude it with a Reject status or add a new file type with an Accept status, which will be considered with the standard list.


Below are the standard list of file types which are currently available.


Now to enforce the file type filtering, you have to associate the File Extension List to the URL Maintenance page.


To do this, click on the URL Properties link which will open the properties page. Here, select FILE_EXT_LIST as the Property Name and provide the file extension which you created as the Property Value.


Administers can upload any type of file names even though this restriction exist. For this they need to have the PTFX Ignore Download Ext Lists attached to their user profile.

2. Copying and Deleting the attachments in batch
We can use the Copy and Clean Attachments using peoplecode for managing files during a transaction. However, if there are large attachments involved in the process, it is recommended to use the batch processes to avoid the PIA timeouts and page freezes.

  • COPYATTS Application Engine program for the batch attachment copy (which uses the CopyAttachments function behind the scenes, which is again a combination of Get and Put attachments)
  • CLEANATT84 Application Engine program for the batch orphan file clean ups (which uses the CleanAttachments function).
So make the File Attachment Framework more robust with these delivered utilities.

Friday, October 16, 2015

How To Control The Size Of The Image Uploaded

There are several scenarios where a certain size of an image is expected for the best results.

Couple of examples are:
  • Photo uploads with a standard size expectation for official document prints,which the user might not stick to, regardless of the image size instructions provided.
  • The images should adhere to the standard image size for the best UX experience, which is again managed by the user.
These typical scenarios can result in non-satisfactory results if a control system is not in place.


Sigh!!! Captain is not uploading it right.

The best method to keep the standard in place is to provide the ability to the user to crop their images upon the upload (all the new websites does this anyway to control the profile picture size for example). PeopleTools has new set of functions which can be used to implement this feature.

Here is how:

User clicks on the 'Upload Your Photo' button
The click launches the crop window with the crop frame which the user can drag or expand to select area within the restricted size constraints
Click OK button to complete the crop

Then you have the cropped version of the image ready to store in the database or file server
The implementation part is pretty simple. It is all about using two delivered functions.

  • InsertImage(RECORD.FIELD);
    • This function assigns the image to a field on the page, which then can be referred in the crop function
  • CropImage(RECORD.FIELD (source: the above one), RECORD.FIELD (target: which can be used for display and save), &width, &height);
    • This function launches the crop interface, which is the best part of this feature.
    • &width, &height controls the crop frame. Set if for a specific situation to be handled.
That's it.

PS Online Help Is Responsive (Partially)

Seems like everything related to PeopleSoft is turning 'responsive' now. Noticed that the HCM online documentation is fluidic. And it is only HCM help at this moment.

It is more convenient to browse on mobile now.




Wednesday, September 16, 2015

How to write an efficient PeopleCode?

Reduce Server Trips

Accessing the sever in between the field navigations causes sever performance issues and it is imperative to manage these trips to make a better coded application.

What happens in a server trip? 
  • All the below activities are repeated for each server trip.
  • Checking security
  • Unpacking the buffers that store the data being processed
  • Processing the service request
  • Generating the HTML for the page to be redisplayed
  • Packing updated buffers
  • Storing the buffers on the web server
The below items brings in server trips
  • Entering data in fields with FieldEdit or FieldChange PeopleCode.
  • Entering data in fields that have prompt table edits.
  • Entering data in fields that have related displays.
  • Inserting a row in a grid or scroll area.
  • Deleting a row from a grid or scroll area.
  • Using grid or scroll area controls to move forward or back.
  • Accessing another page in the component.
  • Selecting an internal tab.
  • Expanding or collapsing a collapsible section.
  • Clicking a button or link.
Steps to identify and control server trips
  • Analyzing server trips: showcounters = 1
  • Using Deferred mode whenever possible
  • Avoid using FieldChange PeopleCode to hide, unhide, enable, or disable elements on the same page. Hiding or unhiding objects and enabling or disabling objects should, as a general rule, be coded in either page Activate PeopleCode or, for objects that are on another page in the component, in FieldChange PeopleCode.
  • Clicking the Refresh button forces a trip to the server
  • Make the calculations / totaling in the deferred mode
  • Use warning messages in Deferred mode with proper value tagging 
  • Use %PerfTime which helps you to determine how long a program takes to execute and adjust it accordingly

Other recommended methods includes
  • Run a SQLTrace and review the transaction for SQL statements that have a long processing time and tune it with the assitance from the DBA
  • A simple join optimizes SQL more effectively than issuing two related SQL statements separately. 
  • While working with the counter, use the GetNextNumberWithGaps PeopleCode function to avoid unwanted commits.
  • Minimize the events to be triggered and consolidate the PeopleCode under less number of events for better managing and performance.
  • Messages sent online should always be coded in the SavePostChange event. Safer that the message will not send until the commit happens
  • Use metadata and Rowset Cache
  • Increasing MaxCacheMemory. Keeping a low memory space can degrade the performance when a significant cache is created and lower the performance
  • Declare all variables upfront and specifically by the type and do not leave the program to do the auto declaration
  • Create application packages for repeated and re-usable code fragments
If you have your suggestions, please comment it below and I  will incorporate in this post.

Tuesday, September 8, 2015

How To Create a Database Level Audit (Trigger)?

Someone asked about Auditing yesterday and I thought I will share some info regrading the same.

You can do Field, Record and Database Audits in PeopleSoft. Record Level Audit gives the load on the App Server and can impact the performance. So the DB level Audit is something that is recommended always.

You already know the basic procedure for Field and Record level auditing - To create an audit record by copying the main record and deleting all the non-key fields and adding the 3 Audit fields and making them the key fields.

Here is how you can create a database level audit or trigger.

First you create the audit record for the main record. That step remains the same. Once you have this, go to PeopleTools > Utilities > Audits > Update Database Level Auditing

Go into the page and provide the details as below and click on the Generate Code.


Either you can copy the code and run it in the SQL Developer or use the below process to run it, if you do no have the database access.

Run the process and once it is gone to success, navigate to the log files and track the trgcode1.sql


Run the SQL in the database and you will get the below error. Solution below:


Navigate to the PSHOME Scripts folder and find out the getpsporid.sql and run it in the DB.


Then run the previous trgcode.sql script again. The trigger will be created.


Use the below SQL to search and track the trigger in the DB


And DONE!

Response on: AUDIT_RECNAME
Adding AUDIT_RECNAME is not complicated. It is an extra key field in addition to the 3 AUDIT fields. The Screenshot below shows how AUDIT_RECNAME tracks the data.


Monday, September 7, 2015

Oracle SES Search Result Hyperlink Not Working

Oracle SES search was working perfect. It was returning the desired results. However if the user tries to click on the link and navigate, nothing will happen. The hyperlink behaves like a normal text.


When right clicked on the page and analyzed the links, there was slashes missing in the base URL's and the server address in the links were not proper. Went to the SES settings and all the ping utilities fired successfully.

Further long analysis led to the non-existence of Portal / Content URI on the local node being the issue. 

If you face the same, these are the steps to resolve:
1. Go to the default node of the instance and provide the Portal / Content URI and Save
2. Go to PeopleTools > Search Framework > Administration > Deploy/Delete Object


Click on Select All and Undeploy. Once all are undeployed,  Select All once again and click Deploy.

This will resolve the Hyperlink issue.

Wednesday, September 2, 2015

Main Security Tables Cheat Sheet

ACCESS PROFILES
PSACCESSPRFL

USERS
PSOPRDEFN
PSOPRDEFN_LANG
PSOPRALIAS
PSROLEUSER
PSUSERATTR
PSUSEREMAIL
PSUSERPRSNLOPTN
PS_ROLEXLATOPR
PS_RTE_CNTL_RUSER

ROLES
PSROLEDEFN
PSROLEDEFNLANG
PSROLECANGRANT
PSROLECLASS

PERMISSION LISTS
PSCLASSDEFN
PSCLASSDEFN_LNG
PSAUTHSIGNON
PSAUTHITEM
PSAUTHPRCS
PSAUTHCUBE
PSAUTHMP
PSAUTHBUSCOMP
PSAUTHQUEUEMON
PSPRCSPRFL
PS_SCRTY_QUERY
PS_SCRTY_ACC_GRP
PS_SCRTY_ADS_AGRP
PSAUTHOPTN
PSAUTHWS
PS_SCRTY_ADS
PS_SCRTY_SRCHGRP
PS_MC_OPR_SECURITY
PS_MC_OPRID

DEFINITION SECURITY
PSPTDEFSEC_GRPS
PSPTDEFSEC_GRP
PSPTDEFSECINRL
PS_APP_DES_OBJ_CST
PSOPROBJ

PERSONALIZATIONS
PSUSEROPTNDEFN
PSUSEROPTNLANG
PSOPTNCATGRPLNG
PSOPTNCATGRPTBL
PSOPTNCATTBL
PSOPTNCATLANG

SECURITY OPTIONS
PSSECOPTIONS

SECURITY LINKS
PSUSEROTHER
PSUSEROTHER_L
PSUSERSELFOTHER
PSUSERSELFOTH_L
PSROLEOTHER
PSROLEOTHER_LNG
PSPERMLISTOTHER
PSPERMLISTOTH_L

USER ID TYPES
PSOPRALIASTYPE
PSOPRALIASFIELD

USER BYPASS TABLE
PS_BYPASS_TABLE

FORGOT EMAIL TEXT
PSPSWDEMAIL
PSPSWDEMAILLANG

PASSWORD HINTS
PSPSWDHINT
PSPSWDHINT_LANG

SIGNON PEOPLECODE
PSSIGNONPPC

DIRECTORY
PSDSDIR
PSDSSRVR
DSCONNECTID
PSDSEXT_INSTALL
PSDSSECMAPMAIN
PSDSSECMAPSRVR
DSUSRPRFLMAP
PSDSUSERPRFL
PSDSSECROLERULE
DSSRCH_SBR
DSSRCHATTR
DSSECFILTER
PT_WF_NOT_DSCFG

Monday, August 31, 2015

Why PeopleSoft Update Manager?

Since CS 9.2 information started coming out, PeopleSoft Update Manager (PUM) caught my attention. It was projected as a highlight feature of 9.2 version. So that was something worth to take a look. The first thing as usual was to do some research and gather some information to get started. 

PUM been around for some time from Applications 9.2 with PeopleTools 8.53 except for Campus Solutions that gives me an option to say that I didn’t try that yet :)

Technically this should be making the life easy as Oracle recommends it by making the tool to be the one stop shop for any kind of SELECTIVE (you can decide/adopt the changes that matters to your business) updates / patches / bug fixes. 

Oracle strongly recommends minimum version PeopleTools 8.53.10+ to avail the minimum benefits of the tool and this is again the pre-requisites for CS 9.2 upgrade. Again, this is a no-brainer. It is a free and powerful upgrade anyway.

What are PI’s? 
PeopleSoft Update Images (PIs) are Oracle VM VirtualBox virtual machines that you download locally. One PI is available per application (database instance), and each will be released periodically according to the image schedule posted on your application's update image home page. 

The PI is the master source environment from which Change Assistant will pull the updated objects, create a custom change package, and apply updates to your environment. The PI for your application is cumulative, so you will download the most current image and get all of the updates that you need.

The PI is a virtual machine running Oracle cross-platform virtualization software called Oracle VM VirtualBox. The PI is offered with Oracle Enterprise Linux as the guest operating system and with Oracle Database as the RDBMS. No additional license requirements exist for PeopleSoft VirtualBox images used for non-production activities such as maintenance, new feature delivery, and demonstration purposes.

Understanding picturization of PUM


Using PeopleSoft Update Manager is the only way to apply maintenance for PeopleSoft 9.2 and Interaction Hub 9.1.


Sunday, August 16, 2015

Why Campus Solutions 9.2?

If you haven't gone through the CS 9.2 FAQ's yet, it is on Oracle Support. Read through and get apprised of its features. 

(Snippet from Oracle Support below)

Announced at Alliance 2014 (March 10, 2014), Oracle is making new, significant investments in Higher Ed solutions that will complement the ongoing investment in functionality to support global Higher Ed operating models in our industry-leading SIS, HCM, and ERP applications.  This includes the creation of a Campus Solutions (CS) 9.2 release, to bring customers a simpler, more productive user experience and more tailored, efficient application life-cycle management process.
 
Campus Solutions 9.2 is focused on three strategic areas:
 
  • Intuitive Experience – Campus Solutions 9.2 will take advantage of the significant enhancements by leveraging  the Tools 8.54 User Experience called Fluid to provide a simpler self-service capability that is optimized for mobile devices as well as a more modern, streamlined maintenance process.
  • Selective Adoption: Campus Solutions 9.2 will enable new methods for managing the Continuous Delivery Model with PeopleSoft Update Manager.  “PUM” is a new, innovative way to manage system updates, fixes, and new feature functionality as they are released. Customers can tailor their maintenance to the needs of their campus, up taking only the items that meet their needs while also reducing the time, effort, and cost required to maintain Campus Solutions.
  • Innovative Functionality: The CS 9.2 release will include all the functionality that has been delivered through the Continuous Delivery Model to the CS 9.0 code line.  CS 9.2 provides the upgrade “event” many customers require to resource, budget, plan and implement the wealth of new capabilities already available to reduce their customizations and improving their business processes.

Friday, June 12, 2015

Happy To Know


http://ps.mytechspeak.com/2014/05/how-to-know-recordfield-names-without.html

Friday, June 5, 2015

Services for Prompt Table and Translate Value Look Up

There are scenarios where a component is integrated with a third party interface to provide service. Say for example, integration Campus Solutions via AAWs using .Net. 

The entire CS functionality is exposed to the interface which has numerous PS delivered Prompts and Translate values. 

How to make sure that the integrated fields refers to the right values and prompts in this situation. Best way is to have a service which tells you the prompt and field values and share it with the third party interface to bind that up to create the drop downs.

And you don't have to create one as there are delivered services which does this job. The service PTLOOKUP retrieves the list of values from PeopleSoft and aid the development efforts.

The two service operations PTLOOKUPPROMT and PTLOOKUPXLAT

The best way to understand how it works and the expected parameters is to go and test it with the test utility. 

You might get a node error initially, then make sure you have an instance to instance routing defined on the respective SO routing tab.

PTLOOKUPPROMT Example:




PTLOOKUPXLAT Example:




Component Interface SDK for Excel

The power of CI is on two areas. Exposing the business rules + integration options. 

You can integrate CI using Java/C++/COM/Web Services. But there is a simple integration which will allow the admin staffs to easily access and review the data in an excel sheet.

That's the CI SDK for Excel. 

You can find the sample Excel SDK file under:                                                     \sdk\pscompintfc\src\com\samples\vba\sdk_bus_exp\sdk_bus_exp.xlsm

Compile the project first, enable the macros, provide the connection details and the excel can work like a from to pull and update data easily for the excel fans.


That's handy.

Tuesday, May 12, 2015

PeopleSoft CFO Tool

If you want to know the main features from one release to another real quick, PeopleSoft CFO Tool page is handy. Use the Cumulative Feature Overview tool to identify product features available to you when upgrading to a new release.


Say if I want to know whats new with Application Engine from 8.53 to 8.54:



And you have it!

You can use the tool to explore the upgrade benefits across the pillars.

Monday, March 30, 2015

SQL Injection and Solution

Few days back I was reviewing a code and stumbled up on this SQL string creation:
&string = "SELECT EMPLID,E_ADDR_TYPE,EMAIL_ADDR FROM PS_EMAIL_ADDRESSES WHERE EMPLID=" | &Emplid;

The requirement was simple enough to get the email ID's through an input from the page. However, this code was vulnerable in its design, which can be a perfect
example for SQL injection technique.

What is SQL injection?
SQL injection is a technique where malicious users can inject SQL commands into an SQL statement, via web page input. Injected SQL commands can alter SQL statement and compromise the security of a web application.

Since SQL statements are text only, it is easy, with a little piece of computer code, to dynamically change SQL statements to provide the user with selected data.


After providing the EMPLID 8000100485, the SQL String will look like this:
SELECT EMPLID,E_ADDR_TYPE,EMAIL_ADDR FROM PS_EMAIL_ADDRESSES WHERE EMPLID=800010048

However, if the user enters 8000100485 or 1=1 (This condition holds true always) in the input field, it opens the entire database for the user to retrieve.

The SQL string gets modified like below:
SELECT EMPLID,E_ADDR_TYPE,EMAIL_ADDR FROM PS_EMAIL_ADDRESSES WHERE EMPLID=8000100485 or 1=1

Few things to avoid SQL injection:
1. Avoid using SQL string generation method to the max
2. If you still use the SQL string method, use Quote function to wrap the input parameters in quotes and avoid SQL injection.

Using Quote function:
&string = "SELECT EMPLID,E_ADDR_TYPE,EMAIL_ADDR FROM PS_EMAIL_ADDRESSES WHERE EMPLID=" | Quote(&Emplid);

Result: SELECT EMPLID,E_ADDR_TYPE,EMAIL_ADDR FROM PS_EMAIL_ADDRESSES WHERE EMPLID='8000100485 or 1=1' (Notice the quote wrapping);

A little care can avoid the chances of getting hacked.

Wednesday, March 25, 2015

Tracing COBOL Process

Below are the steps to trace a COBOL process.

Go to PeopleTools > Process Schedule > Process Types and copy the parameter list value, which is:
%%PRCSNAME%%/%%DBTYPE%%/%%DBNAME%%/%%OPRID%%/%%OPRPSWD%%/%%RUNCNTLID%%/%%INSTANCE%%/135/%%DBFLAG%%


Then navigate to the COBOL process which you want to trace and go to the Override Options page.
Select Override for the Parameter List and paste the SAME value you copied from the Process Type page here. Save the page.

** Do not take out anything from the string


 Now run the COBOL process you want to trace. Once the process goes to success you can see the Trace file under the View Log/Trace.


Thursday, March 19, 2015

External Search Match

Got a chance to work on External Search Match as a part of HCM - CS Split. Good learning and significant use for reducing the duplicates in the shared eco system.


Monday, February 23, 2015

Downloading Attachments With A Click

Add/View/Delete attachment functionalities are commonly used in managing the files in PeopleSoft. A new feature DetachAttachment helps the user to download the file with one click on to the local machine. The file is sent to the browser with appropriate HTTP headers to cause the browser to display a save as dialog box to the user in IE and directly starts the download in Chrome. And that itself is the primary difference between the View and Detach attachment functionality.

DetachAttachment(URLSource, DirAndSysFileName, UserFileName [,PreserveCase])

Dynamic Branding

The requirement was to brand the public facing custom login component with the institution logo. There are 12 institutions and one login page to serve all the institutions. 

The way was to characterize the URL with the institution identifier towards the end of it. 
 
Means: The institution 1 one will have the URL like https://test.institution.edu/psp/testDEV/EMPLOYEE/PUBLIC_link/c/test.test.GBL?INST=INSTI1

For institution 2 https://test.institution.edu/psp/testDEV/EMPLOYEE/PUBLIC_link/c/test.test.GBL?INST=INSTI2 and so on...

Once the page is triggered, the code will look for the INST parameter using 
%Request.GetParameter("INST") which will return the institution code. Based on this, we can select the branding logo to display on the custom page.

You can add any number of parameters to the URL. And rest depends on your dynamic configuration.

Tuesday, January 27, 2015

How To Move The Trees Around

If you are here because Google re-directed you while searching for moving the REAL trees, sorry this is about the PeopleSoft Object Tree, not the natural tree :D 

I was watching yesterday that one of my colleague, trying to move a tree around using a DMS script. He could move the tree, but there were some properties missing due to the missing tables in the DMS script. 

However, there is no need of any DMS script for the Tree Move as we have the inbuilt Tree Utilities which can Export and Import the Tree's between various instances. This is much safer and simpler way to administer the trees in PeopleSoft

Below are the screenshots which tells you how.

The Tree Export:


The file will be generated in the View/Log Trace.




Download the file and place it in a readable Server Directory.

The Tree Import:

Most of the time, the confusion around will be related to the location where the file is placed. The Import path looks for a valid path in the server location. So make sure, you have placed the file in the PS_HOME or server or file directory with proper access. 


Once the process is run successfully, the tree will show up in the tree manager. As simple as that!

Monday, January 26, 2015

More About Fluid Interface

Another holiday (India's 66th Republic Day) today. 

Wanted to spent time with bit of learning and hands-on exercises with some of the latest features of PeopleSoft. That didn't happen as expected.

However, I went through some of the bookmarks from 2014 and encountered the below Fluid Interface videos as a backlogs.





Whoever is yet to try out the fluidic feature of the latest version of PeopleSoft, this will be a helpful good to know session.