Sei sulla pagina 1di 2

Component Interface

Definition:

Component Interface is a PeopleSoft App designer object. This is used to exchange data from other
applications or other components within the PeopleSoft system with the same feel as that of the
component transaction. This is both synchronous and asynchronous and it can be used in both online
and batch.

Example:
Online Synchronous: Verifying credit card details by connecting to PeopleSoft FSCM from a web page
Online Asynchronous: Adding /updating customer contacts into PeopleSoft whenever the online
shopping website is updated. Here update to the PeopleSoft system can happen in parallel to user
transactions in the shopping site.
Batch synchronous: Updates to the other application are done within the same program.
Batch asynchronous: Updates to the other application are posted and it will be picked by another
program

Details:

Any number of CIs can be created for any component. Without a component CI cannot be created.

CI is used in the PeopleCode as a class of APIObject. This can be also used in other platform languages
like Java, .Net, etc.

If drag and drop a CI into a PeopleCode event then a template code will be generated automatically. This
code can be modified to fit to our purpose.

Methods: Get, Create, Find, Save and Cancel


One can define user-defined methods as well in the CI object itself when required

Properties: All fields in the pages within Component Interface are called properties. Display only fields
are read-only in nature.

Collections: Any levels within the pages of Component Interface are called collections. A collection is
similar to Rowset.

Collection Methods: Item, InsertItem, and DeleteItem. Item is used for reading and updating properties.

Permission: Give permission to the Component Interface and specify the methods that you want to give
access to the other application

Meta table: PSAUTHBUSCOMP (CLASSID, BCNAME)

CI can be written behind buttons and save on the page. It can be written in the Application Engine
PeopleCode action.
Use names of Properties as per the CI definition. For example if a field is repeated in the component
across levels, then in the CI the corresponding property will be identified differently.
E.g., NAME, NAME_1

Some of the PeopleCode functions like Gray, Ungray, DoSave, Domodal or Transfer will not be called
from CI even if they are used within the underlying component PeopleCode.

SearchInit, SearchSave and RowSelect are not triggered through CI.

Also Menu Peoplecodes are not triggered (ItemSelect, PrePopup)

General coding steps:

1. Initialize Session: &session = %session


2. Get Component Interface. Check if it is available and permitted to be used. Otherwise stop
processing
3. Set general properties for CI.
a. PSMessagesMode: 1 (Default)
i. 0 – No messages
ii. 1 – All internal messages sent to PSMessage class. So if we call Errorhandler()
function then only messages will come
iii. 2 – Messages within PeopleCode events are displayed/shown in message log of
process monitor
iv. 3 – Both internal messages and PeopleCode messages within the component
will be displayed/shown in the message log of process monitor
b. InteractiveMode: False (Default)
c. GetHistoryItems: True (Default) Applicable only for collections with Effective date
d. EditHistoryItems: False (Default) Applicable only for collections with Effective date
4. Assign search keys
5. Call Get method. If failed call Create. If there is no Create method available then call
errorhandler to print all error messages
6. If Create fails then call errorhandler to print all error messages
7. If Get works fine, then assign/update values of properties and collections. Insert items at row 1
always. DeleteItem can be called with CurrentItemNumber property if required
8. If Create works fine, then assign/update values of properties in level0. There will be one dummy
item available in the collection. Update this item using .Item(1) property
9. Finally use Save method and save the transaction. If Save fails call errorhandler to print all error
messages
10. If save fails then use Cancel method to come out of the current data and then move to next
employee (Cancel is equal to Return to Search)

Additional beautification steps: Modify the messages in the CI using message set number to prepare
user-friendly messages before printing.

Potrebbero piacerti anche