Monday, 2 March 2015

PeopleTools tables: Meta data

PeopleTools tables Categorized 

PeopleSoft Project:   PSPROJECTDEFN, PSPROJECTITEM

PeopleSoft Portal Structure : PSPRSMDEFN, PSPRSMPERM

XLAT information: PSXLATTABLE, PSXLATDEFN, PSXLATITEM

PS records: PSRECDEFN

PS fields: PSDBFIELD

PS Pages:  PSPNLDEFN

PS Components: PSPNLGRPDEFN

Message Catalog tables:  PSMSGCATDEFN

Application engine:  PSAEAPPLDEFN, PSAEAPPLSTATE, PSAESECTDEFN, PSAESECTDTLDEFN, PSAEAPPLTEMPTBL, PSAESTEPDEFN, PSAESTMTDEFN, PSAESTEPMSGDEFN


So many other Peopletools tables are there. But above listed we will use on very regularly in our development practice.


Intrested in PeopleSoft Learning Please reach us on  info@OnlineIT365.com 
OnlineIT365.com.
www.facebook.com/ONLINEIT365
twitter.com/ONLINEIT365


Table lock identification in Database

We will face very regularly, Table lock issue which will cause the Application engines and SQR processes to error.

Here is the sql to find out the locked tables in Database.

select
c.owner,
c.object_name,
c.object_type,
b.sid,
b.serial#,
b.status,
b.osuser,
b.machine,
b.program,
b.type,
b.client_info
from
v$locked_object a ,
v$session b,
dba_objects c
where
b.sid = a.session_id
and
a.object_id = c.object_id;


Once we identified the table is locked we can request DBA team to release the table.

Intrested in PeopleSoft Learning Please reach us on  info@OnlineIT365.com 
OnlineIT365.com.
www.facebook.com/ONLINEIT365
twitter.com/ONLINEIT365

XML Publisher secured PDF file generation


We can Create the PDF files with Password secure. Please find the below steps to create that.

1. Open the file in the navigation PSHOME> Appserver> XDO.cfg

2. In Original file the code will be looks like this. (as per the tools version 8.50)

<config version="1.0.0" xmlns="http://xmlns.oracle.com/oxp/config/">

    <properties>
        <!-- System level properties -->
        <property name="xslt-xdoparser">true</property> 
        <property name="xslt-scalable">true</property>
        <property name="system-cachepage-size">50</property>
        <property name="system-temp-dir"></property>
    </properties>


    <!--<fonts>-->
        <!--<font family="3 of 9 Barcode" style="normal" weight="normal">-->
            <!--<truetype path="C:\WINNT\Fonts\3of9.ttf" />-->
        <!--</font>-->
    <!--</fonts>-->


</config>


3. open the file and edit the code like below.

   <properties>
        <!-- System level properties -->
        <property name="xslt-xdoparser">true</property> 
        <property name="xslt-scalable">true</property>
        <property name="system-cachepage-size">50</property>
        <property name="system-temp-dir"></property>
     
       <!-- PDF compression -->
        <property name="pdf-compression">true</property>
       <!-- PDF Security -->
        <!-- <property name="pdf-security">true</property> -->
        <!-- <property name="pdf-open-password">user</property> -->
        <!-- <property name="pdf-permissions-password">owner</property> -->
    </properties>





Intrested in PeopleSoft Learning Please reach us on  info@OnlineIT365.com 
OnlineIT365.com.
www.facebook.com/ONLINEIT365
twitter.com/ONLINEIT365

Thursday, 19 February 2015

PeopleSoft security: Row level Security

Understanding Row level security

PeopleSoft components are parent/child hierarchies of database records that automatically get pulled together as one unit of work from the application developer's perspective.For example, if a customer master record is at level 0 and has CUSTOMER_ID as it's unique key, you might have customer contacts at level 1 keyed by CUSTOMER_ID and CONTACT_ID. Customer contact phone numbers might be at level 2, keyed by CUSTOMER_ID, CONTACT_ID and PHONE_ID.The important thing to keep in mind here from the perspective of row level security is that populating the key fields in the level o record drives everything else. This is what the seach dialogs are responsible for. But where does that list come from? Each component has what is known as a search record. The component processor uses the search record to supply the values for the key fields of the level 0 record, which then flow down to the child levels.

Any rows of data that the search record returns to the user gives the user access to that data.

So if you wanted to limit someone to only look at active customers, then you could create a view that had the same key fields as the customer master record, but had a WHERE clause like " WHERE CUSTOMER_STATUS='A' ". The view would only return active customers, which means that no one could get into that component to look at an inactive customer.


The component processor recognizes a couple of "special" fields on search records - OPRID and OPRCLASS. If the field OPRID exists on the search record, it automatically gets filled in with the current logged in user's ID. If the field OPRCLASS exists on the search record, it gets filled in with the Row Level Security Class (Permission List) that is specified on the user's security profile.

And that's essentially it for how the component processor handles things for row level security. There are a couple of PeopleCode events that fire when a search dialog is initialized (SearchInit) and when the user clicks "Search" (SearchSave), but those are not really intended for row level security.


So how does the department tree security in HR work then? The HR group created a setup page that lets you pick a security class (permission list) and a tree node from the department security tree. For each one of these combos that you select, you decide whether access is granted or denied. All of this data is stored in a table. The HR team then created a view that links this table, the tree manager tables, and the employee department data together. The component processor automatically plugs in the row level security class for the user when selecting from the view, which limits what the user can see.

Financials works in a similar fashion, although the performance of the trees in the view didn't work well enough for them so they ended up with flatter security structures. The HR team actually delivered a couple of de-normalizing utilities for larger customers to deal with this issue as well.

So, how do you change that delivered security?

You could clone the delivered security views (and the tables/pages that they use to maintain the data). I helped a customer once do this where they wanted to use the position tree instead of the department tree.

You can also create your own security structures that do not mimic the delivered ones. All that matters is that you have a table or view that will return the key values that a user has access to. All that matters is that the search record has the same key fields as the level 0 record in the component that you're securing and that you either have the OPRID or OPRCLASS there to provide security.

There are no restrictions about what data the search record looks at or how that data gets maintained. For example, you might have some batch job that updates the table based on security defined in some totally different system. Or maybe someone has to request access to look at some data and security administrator will update the table that the search record looks at. I know of one customer that wanted to have their call center employees only be able to look at customer data when a call came in. So right before the server would send the screen pop for the customer data down to the agent's desktop, the security tables would be updated for that user to have access. As soon as the call was over, then access was taken away.

So the development of a new search record/view is one cost. This includes not just the technical development, but the auditing to make sure that it works properly as well.

Another cost is that the search record is attached to the component definition. So if you update a whole bunch of components to point to different search records, then you have to keep track of that at upgrade time. This is less costly than doing things like changing delivered code since you just need to add one extra step in your upgrade - update any changed components again. Not really a lot of thinking/analysis involved. But, a lot of customers like to run as close to vanilla as they can, so it is worth keeping in mind.




Intrested in PeopleSoft Learning Please reach us on  info@OnlineIT365.com 
OnlineIT365.com.
www.facebook.com/ONLINEIT365
twitter.com/ONLINEIT365



PeopleSoft Security Jobs to run in PIA

 Refresh SJT_OPR_CLS and SJT_CLASS_ALL


Scenarios to refresh SJT_OPR_CLS

1) Changes done in Navigation: Peopletools> Security > Permissons and roles > Roles

• Add a permission list with data permission to a role that is already assigned to one or more users.



• Remove a permission list with data permission from a role that is already assigned to one or more users.

2) Changes done in Navigation: Peopletools> Security > User profiles

  • Add a row security permission list.
  • Delete a row security permission list.
  • Add a role with data permission.
  • Delete a role with data permission.
  • Clone an existing profile that has data permission through roles or a row security permission list.
  • Deactivate a user.
  • You can refresh SJT_OPR_CLS in real-time by using the subscriptions on the USER_PROFILE and ROLE_MAINT messages or on demand using the SCRTY_OPRCLS app engine process

Scenarios to refresh SJT_CLASS_ALL


• Add a new department to a department security tree.

• Delete a department from a department security tree.

• Move a department to another parent node in a department security tree.

• Modify a department security tree.




Intrested in PeopleSoft Learning Please reach us on  info@OnlineIT365.com
 OnlineIT365.com.
 https://www.facebook.com/ONLINEIT365
 https://twitter.com/ONLINEIT365

Change the Oracle Logo on PeopleSoft Portal pages.

Change the Oracle logo on PeopleSoft portal pages

Here is the solution in different methods.

1) Quick Solution
If your desired image is the same dimensions (or can be resized to be the same dimensions) as the vanilla logo then you can just upload your new image over the NEW_PS_LOGO image in App Designer.

2) Who are implementing Enterprise Portal
If you have the portal product, you can navigate to Portal Administration > Branding > Define Headers. On the Images Tab you can select the new image (you’ll have to load it in via App Designer first or have it available via a URL). On the Attributes tab of the grid you can also enter sizes, so the image dimensions don’t have to match the delivered image.

3)  Without Enterprise Portal
A little more effort is required if you don’t have the portal product. The default image is 145×41 pixels, and if you can get your company logo to look good in those dimensions then the job is really simple, just change the NEW_PS_LOGO Image as above. If you want to change the dimensions of the image, then there are 3 HTML objects to check:
- PORTAL_UNI_HEADER_NS4X
- PORTAL_UNI_HEADER_NNS
- PORTAL_EXP_PASSWORD_HDR
Changing the width of the image is straightforward. If you want to change the height then you will probably find you have to rejig the tables a little.


The image can be either a Jpeg, a Gif, or – if you want to get really creative – an animated Gif. The Image name is hardcoded into PeopleCode so you may as well overwrite the delivered image as alter the delivered PeopleCode, but if you want to have a look it’s in the PT_BRANDING App Package.

Be aware that if you do overwrite the delivered image then the new image will appear everywhere that the delivered image would have, such as the Timeout warning popup message and the expired Password screen.

NB: Even though we are changing the Logo still the tool tip will be displaying as Oracle Logo. For changing this we need to modify the HTML objects (PORTAL_EXP_PASSWORD_HDR
PORTAL_UNI_HEADER_NNS) 


Intrested in PeopleSoft Learning Please reach us on  info@OnlineIT365.com
 OnlineIT365.com.
 https://www.facebook.com/ONLINEIT365
 https://twitter.com/ONLINEIT365

PeopleSoft Application engine Temporary tables information

Application engine Temporary tables

Temporary tables are used exclusively with Application Engine programs and are intended to provide parallel processing. The Application Engine programs may be executed online via CallAppEngine or invoked through the Process Scheduler.
 
Parallel or concurrent processing allows multiple instances of an Application Engine program to execute against the same tables while drastically reducing the risk for table contention.
 
Batch process performance can be improved by splitting the data to be processed into groups and simultaneously running multiple instances of the program to deal with different groups of data. For example, students could be processed by last name by splitting the group into multiple groups alphabetically.
 
If you have a program that uses a temporary table and it is invoked multiple times, that single temporary table could be used concurrently in multiple executions of the code.
 
This could create unpredictable results since the different instances of the code would be issuing Deletes, Inserts, and/or Updates unsynchronized with each other.
 
You could solve this problem by creating multiple temporary tables as a pool of tables. Each invocation of your program would have to allocate an unused temporary table, mark it as “in use” and release it back to the pool when you are through with it.
 
By using the Temporary Table record type definition, you are able to define a record and the PS Build process will build multiple uniquely named copies of your Temporary Table as a pool.
 
Additionally, PS does Temporary Table management for your Application Engine programs. You can code your program with supplied meta-SQL (%Table) so each execution of your Application Engine program will be given access to its own copy of the Temporary Table for its exclusive use. When the program ends, the table will be returned to the pool of Temporary Tables.
 
Temporary Table Pools
 
Online Pool
  •  Defined in PeopleTools Options by PS Admins. Our current setting is five (5).
  •  Used by Application Engine programs invoked by CallAppEngine.
Batch Pool
  •  Defined in Application Engine program properties. Properties that must be set include:
  •  Assign Temporary Tables to the Application Engine program (Temp Table tab)
  •  Set the Instance Count (Temp Table tab). The number entered here will dedicate the number of instances requested for the AE program.
  •  Set the Runtime option (Temp Table tab). This is the action the AE program will take if batch/dedicated tables cannot be allocated at runtime.
  •  Continue – the base table will be used instead (using Process Instance)
  •  Abort – program execution terminates.
  •  Set the Batch Only checkbox (Advanced tab). If the program will only be run in batch mode and not executed from the CallAppEngine() PeopleCode function, you should use this checkbox. Any dedicated temporary tables used for Batch Only programs do not have online instances created.
Important Notes
  •   Instance Count and the Batch Only checkbox should be set prior to building the record definition.
  •   If the temporary table was originally built with online instances (Batch Only checkbox is not checked) and then changed to “batch only”, online tables must be dropped manually.
 
Program Meta-SQL
 
A critical step in implementing parallel processing is to make sure that you’ve included all of the appropriate meta-SQL within the PeopleCode that your Application Engine program executes.
 
To reference a temp table (Online or Batch), you need to use:
 
%Table(record)
 
You can reference any table with %Table, but only those records defined as Temporary Tables get replaced by Application Engine with a numbered instance of a Temporary Table from the Temporary Table pool.
 
For batch/dedicated Temporary Tables, when Application Engine resolves any %Table, it checks an internal array to see if a Temporary Table instance has already been chosen for the current record. If so, then Application Engine substitutes the chosen table name. If there are no more batch/dedicated instances available, then Application Engine uses the base table instance by default (if the Runtime option Continue has been chosen). Regardless of whether %Table is in PeopleCode SQL or in an Application Engine SQL Action, the program uses the same physical SQL table.
 
For synchronous calls to Application Engine, an available instance number will be selected at random according to internal rules. Synchronous refers to using the CallAppEngine PeopleCode function; all other methods that you use to invoke Application Engine programs are asynchronous which means the page is not “frozen” while the program runs to completion.
 
Populate your Temporary Table Process Instance with the Process Instance
 
All temporary tables should be keyed by Process Instance as a general rule. Also, if you have opted to use the “Continue” runtime option when batch/dedicated tables can’t be assigned, Process Instance is required as a key field. The current Process Instance is automatically put into the State record, but when you Insert rows into your Temporary Tables you must supply that Process Instance.
 
%ProcessInstance or %Bind(PROCESS_INSTANCE)
 
This meta-SQL returns the numeric (unquoted) Process Instance. The %PROCESSINSTANCE meta-SQL is more efficient and faster than using the %Bind(PROCESS_INSTANCE).
 
Note: The Process Instance value is always zero for programs initiated with CallAppEngine. This is because the program called with CallAppEngine runs “in process”, that is, it runs within the same unit of work as the component with which it is associated.
 
Clear Temporary Tables (%TruncateTable)
 
You do not need to delete data from a Temporary Table manually. The Temporary Tables are truncated automatically at the end of processing. If the shared base table has been allocated because no batch/dedicated instances were available, then Application Engine performs a delete of rows by Process Instance instead of performing a truncate. In such a case, the PROCESS_INSTANCE is required as a high-level key.
 
You can perform additional deletes of Temporary Table results during the run, but you will need to include your own SQL Action that does a %TruncateTable.
 
Implementing Parallel Processing
 
There is no simple switch or checkbox that enables you to turn parallel processing on and off. To implement parallel processing, you need to complete a set of tasks in the order that they appear in the following list.
 
1. Define your Temporary Tables by defining and saving your Temporary Table records as type “Temporary Table”.
 
2. Set the Temporary Table Online pool. This will set the basic Temporary Table Online pool based on the PeopleTools Options specifications. (Note: This is done one time by the PS Admin group).
 
3. Assign Temporary Tables to your Application Engine program in its Program Properties, setting the appropriate number of Instance Counts and Runtime option.
 
4. Build/Rebuild your Temporary Table record. This will build the necessary Batch temporary tables into that record’s Temporary Table pool for use at execution time.
 
5. Code %Table meta-SQL as references to Temporary Tables in your Application Engine program, so that Application Engine can resolve table references to the assigned Temporary Table instance dynamically at runtime.



Intrested in PeopleSoft Learning Please reach us on  info@OnlineIT365.com
 OnlineIT365.com.
 https://www.facebook.com/ONLINEIT365
 https://twitter.com/ONLINEIT365