Monday, August 9, 2010

Adding a tablespace in PeopleSoft (Tools 8.49.12)

After the DBA has created the table space, you need to add it to PeopleTools table to make it available for the App Designer. Follow these steps to do so
  1. Navigate to PeopleTools -> Utilities ->  Administration -> Tablespace Utilities
  2. Add another row in the grid, enter Tablespace name, Database name, Type and save. Type would be Regular for most cases. We have a few LOBs for file attachments.
You are done, new Tablespace should show up in App Designer now. If you are adding a new Tablespace just for indexes do not add it to the list of Tablespaces in Tablespace Utilities. Tablespace for indexes can be overriden in record definition. Follow these steps:
  1. Open up the record definition up in App Designer 
  2. Go to Tools -> Data Administration -> Indexs
  3. Select index and click on Edit DDL
  4. Go to your database section and select INDEXSPC and click on Edit Parm
  5. A new window will pop up and you need to enter the Tablespace name in the Override value field
  6. Keep in mind that this method overrides the tablespace only for the index you selected in step3.
Follow these steps if you want to change the tablespace for all newly created indexes (System Wide)
  1.  Navigate to PeopleTools -> Utilities -> Administration -> DDL Model Defaults
  2. Select your database type, scroll to indexes and change parameter INDEXSPC. See the screenshot below.

Friday, July 30, 2010

Handling Integration Broker Error

When integrating with third party applications you may get http 500 error which means that the request failed. It can fail for various reasons and you don't have access to the integrating systems all the time. It is a good practice to handle such errors so that users can see a simple message instead of a cryptic PeopleSoft message. Try Catch block does not handle this error very well and causes the application to error out. You can use system variable %IB_Status_Success to check if the request was successful. Here is a sample code : 


&Response_Msg = %IntBroker.SyncRequest(&Request_Msg);
If &Response_Msg.ResponseStatus = %IB_Status_Success Then
       /* Request was succesful , do response processing */
else
       /* Syncing failed,  do error handling */
      &Msg_Set = &Response_Msg.IBException.MessageSetNumber;
      &Msg_Number = &Response_Msg.IBException.MessageNumber;
      &Msg_Descr = &Response_Msg.IBException.ToString();
      &Fault_Data = &Response_Msg.GetContentString();
       /* You can write response in a file or look for logs on the gateway.  */
      &Response_File =  GetFile(&PS_HOME | " *.xml", "W", %FilePath_Absolute);
      &XML =CreateXmlDoc(&Fault_Data);
      &Response_File.WriteString(&XML.GenFormattedXmlString());
      /* You can display a message to the user here */
end-if;

P.S: Deafult path for Integration Broker error log  is
\\PS_HOME\webserv\peoplesoft\applications\peoplesoft\PSIGW\errorlog.html

Saturday, June 26, 2010

Security Certificate Installation in PeopleSoft environment

You know you need to install security certificates when you see messages like "HttpTargetConnector:PSHttpFactory init or setCertificate failed" in the integration broker log. Well, I had to spent couple of hours to figure that out. I am writing down the steps involved to install certificates so that you could save some time.

  1. Open the certificate from a browser and go the details tab. Export all the certificates in hierarchy by selecting them one by one and then clicking on export
  2. If you saved these certificates on a different machine move them to the Peoplesoft Webserver. Peoplesoft provides a utility called pskeymanager to manage security certificates. The executable resides in PS_HOME\webserv\peoplesoft\bin ( In PT 8.51 the executable is moved to  PS_HOME\webserv\peoplesoft\piabin )
  3. Type pskeymanager -import in a command prompt
  4. Enter password when prompted. Default password is password
  5. Enter alias for the certificate
  6. Enter path for the certificate
  7. You should see a message for successful import
  8. You have to import all the certificates in hierarchy
  9. Don't forget to restart the web server and you should be good to go
  10. If your web server hosts multiple environments, these certificates will be available to all of them