Thursday, March 6, 2014

Testing and Programming the Component Interface

PROGRAMMING THE COMPONENT INTERFACE

In this post, we’re going to walk through programming the component interface using PeopleCode. But before we do that, I want to highlight Component Interface Security and Testing.

CI SECURITY
As with any PeopleTools object, access must specifically be granted before anyone can access it at run-time. Before it can be tested, security must be granted for the given Component Interface and the specific methods. You use Permission Lists to grant component interface security for users.

1. Navigate to Security -> Permission Lists and Create or Open an Existing Permission List

2. Click on the Component Interfaces Tab

3. Click the + sign to insert a row and choose your Component Interface


4. Next, click the Edit link next to the CI to grant access rights.


5. Save your Permission List and Grant it to the User that will be Testing it.


TESTING YOUR CI

Before we begin to discuss programming the Component Interface, lets test our CI.

1. From Application Designer, click Tools, Test Component Interface. Or just right click from the top entry in the component interface and select test component interface.


2. First it will ask you to save the component interface, give it a name and save it.

3. When you run the test, it allows you to bring up an instance of a component interface. You bring up a specific instance with either:

GETKEYS: A list of the primary (required) key fields on the search record. This list is automatically generated.

Or

FINDKEYS: A list of primary and alternate key fields on the primary search record for the component. You can also set whether to get history items with the checkbox. Interactive mode is already set by default.

4. Right click Test Component Interface.

5. Click Get History Items

6. Double-click USERID under find and enter a valid USERID then click Find. Then from the find results, click Get Selected


You are now looking at the component interface tester. You have a tree structure of the component.

  • You can right click a Rowset and insert, delete, modify a row
  • You can click on a plus sign and expand a Rowset or a row.
  •  You can enter data, edit data, delete.
  •  Everything you can do with a component.\

Here is the biggest advantage of a component interface: When you enter data, you trigger all the same PeopleCode you would from a component. FieldChange, SaveEdit etc.

There is a message box at the bottom of the screen to display any warning or error messages. When you are done and ready to save or cancel, you right click the top row of the component interface and click save, cancel etc.

No comments:

Post a Comment