9/10/2015

Simple Tip to refresh structure & content

One thing I always find annoying is when I have to add a new portal object in the structure and content.  Especially went migrated to another environment, if the server caches are not cleared, the new link might only appear after few days.  Of course, Business Analysts would never understand this limitation.

My collegues and me found an easy way to make a link appear.  Here is the procedure :

- Navigate to Structure & Content
- Within Structure & Content, navigate to the parent folder of the object (link or folder) which is not displayed
- Modify a "brother" (other child of the parent) of the not displayed object
- Add a space at the end of the description (the space will be removed when saving, which will avoid us to put back the original value of the description and save again)
- Save

The link will appear.

If the new object has no brothers, I guess that doing the same procedure on the father might have the same effect.

7/16/2015

Component Interface for dummies

Any Peoplesoft Developer who used and debugged code calling component interfaces might understand what really is a CI, but, from my experiments, a lot of people do not understand the CI concept at all, especially non-thecnical (BAs, PMs) resources.  They think it is something coded, which emulates online and executes ALL peoplecode such as if a user would navigate throught the Component and Pages within Peoplesoft.

I found it complicated to explain to those people the scope of a Component Interface.  It is simply a LAYER around a Component to be able to call it from Peoplecode so online rules apply ALMOST such as when a user navigates online.

I was trying to explain it to my PM who thought she understood the concept but the message would definetely not pass.  Back home, I got a revelation.  I saw my Polaroid Cube (kind of GO PRO camera) inside its camera case.  See below



The Polaroid Cube camera is very primitive.  It has only one button; 3 seconds press for on/off, 1 click for a picture, 2 quick cliks to start or stop recording a video.  It also has a powerful magnet under, to be fixed easily on an ironned surface.

The case is as primitive as the camera.  It is transparent so the camera can film/take pictures.  It has one push button that transmits the push action to the camera.  It can be locked so water does not access to the camera, and has a mounting adaptor, to be fixed to mounts (bike mount, helmet mount, suction mount).

If we think about it, the case allow the user to use some of the camera's functionalities underwater : turn on, turn off, start recording, stop recording, take a picture.  Some functionalities do not work with the case, such as the magnet mount, charge the camera or remove the SD card.  However, new functionalities are available, such as the mounting adaptor.

So, my conclusion is : the Component Interface is at the Component what the Case is at the Camera.


6/16/2015

Component Interface - Calling Find() method

It doesn't seem to be a big deal, calling the Find method should be a piece of cake, but I didn't find any example on the net.  So, here is my explanation :

I. Generate the code to call a CI - simply drag a CI into a blank Peoplecode window.

II. Declare ApiObjects for results of the find :
Local ApiObject &FindKeyCollection, &FindKeyRec;

III. In the code calling the component interface, enter values in keys (optional)
&oCiSsrSsenrlList.STRM = "2151";

IV. Call the Find method; it returns a collection of rows in the search record
&FindKeyCollection = &oCiSsrSsenrlList.Find();

V. Travel through the collection of rows and process each row as needed (stock in an array, select a row, call Get method)
   Local integer &ixyz;
   For &ixyz = 1 To &FindKeyCollection.Count;
      &FindKeyRec = &FindKeyCollection.Item(&ixyz);
      MessageBox(0, "", 0, 0, "INSTITUTION=[" | &FindKeyRec.INSTITUTION | "];ACAD_CAREER=[" | &FindKeyRec.ACAD_CAREER | "];STRM=[" | &FindKeyRec.STRM | "]");
   End-For;


Code : 

[...]  

   &fileLog.WriteLine("Begin");
   rem ***** Get current PeopleSoft Session *****;
   &oSession = %Session;
   
   rem ***** Set the PeopleSoft Session Error Message Mode *****;
   rem ***** 0 - None *****;
   rem ***** 1 - PSMessage Collection only (default) *****;
   rem ***** 2 - Message Box only *****;
   rem ***** 3 - Both collection and message box *****;
   &oSession.PSMessagesMode = 1;
   
   rem ***** Get the Component Interface *****;
   &oCiSsrSsenrlList = &oSession.GetCompIntfc(CompIntfc.CI_SSR_SSENRL_LIST);
   If &oCiSsrSsenrlList = Null Then
      errorHandler();
      throw CreateException(0, 0, "GetCompIntfc failed");
   End-If;
   
   rem ***** Set the Component Interface Mode *****;
   &oCiSsrSsenrlList.InteractiveMode = False;
   &oCiSsrSsenrlList.GetHistoryItems = True;
   &oCiSsrSsenrlList.EditHistoryItems = False;
   

   &oCiSsrSsenrlList.STRM = "2151";
   
   &FindKeyCollection = &oCiSsrSsenrlList.Find();
   
   Local integer &ixyz;
   For &ixyz = 1 To &FindKeyCollection.Count;
      &FindKeyRec = &FindKeyCollection.Item(&ixyz);
      MessageBox(0, "", 0, 0, "INSTITUTION=[" | &FindKeyRec.INSTITUTION | "];ACAD_CAREER=[" | &FindKeyRec.ACAD_CAREER | "];STRM=[" | &FindKeyRec.STRM | "]");
   End-For;

[...]