Understanding Internet Script Classes

An Internet Script, also called an iScript, is a specialized PeopleCode function that generates dynamic web content. iScripts interact with web clients (browsers) using a request-response paradigm based on the behavior of the Hypertext Transfer Protocol.

iScripts work with PeopleSoft Pure Internet Architecture. You must have PeopleSoft Pure Internet Architecture set up correctly before you can run an iScript.

Image: Communication flow chart for Internet Scripts

The following flow chart shows the interaction of an iScript (PeopleCode) in a PeopleSoft Pure Internet Architecture application.

Communication flow chart for Internet Scripts
  1. An HTTP request arrives at the web server specifying in its URL the Presentation Relay Servlet (psc). The path information included in the URL specifies which PeopleCode program to run. No component is specified because none is needed. The PeopleCode program (iScript) runs directly. The following is an example of the URL:

    http://serverx/Servlets/psp/ps84/e_procurement/fdm/s/WEBLIB_BEN_401k.PAGES.FieldFormula.IScript_Home401k
  2. The psc servlet is invoked by the web server. It serializes all necessary information from the web server request and response objects, then makes a call through JOLT to the PeopleSoft application server service passing the serialized object information.

  3. The application server unpacks all of the object information and creates PeopleSoft versions of the Request and Response objects. It then calls the function in the PeopleCode program specified in the URL. The PeopleCode Request and Response objects are available to the PeopleCode program through the system variables %Request and %Response.

  4. The PeopleCode program is then responsible for generating every aspect of the HTML page that is to be returned to the browser. It has access to the Request object to view items such as query string parameters, cookies, and headers. It also has access to component interfaces, business interlinks, and Rowset objects to interact with applications. HTML definitions are available to include language sensitive blocks of HTML. They can also contain JavaScript. The message catalog is also available for language sensitive messages. The Response object is used to "write" the generated HTML back to the browser.

  5. When the PeopleCode program is finished running, the headers, cookies, and HTML in the PeopleSoft Response object are serialized and returned through JOLT to the Presentation Relay Servlet.

  6. The Presentation Relay Servlet then unpacks the Response information generated by the PeopleCode.

  7. The servlet plays the information back to the web server response object, which in turn sends the response to the user's browser.