Skip Headers

Oracle® Application Server Integration Adapter for PeopleSoft 8 User's Guide
10g (9.0.4)

Part Number B10298-01
Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index

Go to previous page Go to next page

4
Component Interface Interactions

This chapter provides information about the Component Interface standard and user-defined interactions for Oracle Application Server Integration Adapter for PeopleSoft 8. This chapter discusses the following topics:

Component Interface Standard Interactions

Oracle Application Server ProcessConnect provides the following standard interactions for Component Interfaces:

In the following discussions, a single record is correlated to multiple keys.

Create

Use the Create interaction to create a new record using a set of unique keys and specified properties.

Syntax

Create (key1, key2, ... keyn, properties)

where:

Description

You can call Create() without a set of explicit keys; however, the Create interaction returns a set of keys. This behavior is supported with PeopleCode, which is triggered on the server. For example, to create a Purchase Order, the client may not know what the next available PO number is. By specifying NEXT as the PO number key, the call triggers PeopleCode, which determines the next available PO number. This information must be returned to the calling client, using the in/out key parameters.

The Oracle Application Server ProcessConnect Create() interaction is available if the PeopleSoft's Create and Save interactions in the Component Interface are enabled on the PeopleSoft server.

CreateEx

You use the CreateEx interaction to create a new record using a set of unique keys and specified properties.

Syntax

CreateEx(key1, key2, ..., keyn, interactiveMode, properties)

where

Description

In some situations, it is common practice to call CreateEx() without a set of explicit keys, but the CreateEx interaction returns them. This behavior is supported with PeopleCode that gets triggered on the server. For example, to create a Purchase Order, the client may not know what the next available PO number is. By specifying NEXT as the PO number key, the call triggers PeopleCode which determines the next available PO number. This information must be returned to the calling client, using the in/out key parameters.

The Oracle Application Server ProcessConnect CreateEx() interaction is available if the PeopleSoft's Create and Save interactions in the Component Interface are enabled on the PeopleSoft server.

DeleteOnly

The DeleteOnly method allows you to delete items in a collection.

Syntax

DeleteOnly(key1, key2, ..., keyn, correctionMode, interactiveMode, properties)

where

Description

The properties have the same datatype as the CreateEx or UpdateEx methods of this Component Interface; however, only the key values are important. The nonkey values are ignored. The key values must match those on the server, otherwise an exception is raised.

The following demonstrates the use of the key values. If a collection contains the items:

item0
item1
item2
item3

you can delete item1 and item3 by providing the keys of item1 and item3 in the properties:

item1
item3

After the call, the server has the remaining items in the collection:

item0
item2

The second example, shows the items containing other collections:

item0
item0a
item1
item1a
item1b
item1c
item2
item2a
item2b

You can delete item1b and all of item2 by giving the keys to item1b and item2:

item1
item1b
item2

By providing an empty subcollection for item2, you turn it into a leaf and that entire subbranch is deleted. After the call, the server has the remaining items:

item0
item0a
item1
item1a
item1c

Find

Use the Find interaction to return a list of keys that satisfy the supplied partial search keys. If the Component Interface has only one instance without a key, then the Find() interaction is not generated.

See Also:

"Get"

Syntax

Find (partialKey, keyList)

where:

The keys correspond to the set of Find Keys as defined for the particular Component Interface.

Description

When specifying partialKey, you can use the same wildcard search available from the PeopleSoft internal Find() interaction. For example, the partial ACCOUNT key of 11 returns all ACCOUNT keys that start with 11, whereas %40 returns all ACCOUNT keys that contain 40 anywhere within the key. The partial key _4_4 returns all ACCOUNT keys with the character 4 in the second and fourth positions.

The Oracle Application Server ProcessConnect Find() interaction is available if the PeopleSoft Find interaction in the Component Interface is enabled and Get keys are available.

.


Note:

With the current implementation of the PeopleSoft Server, if more than 300 items match the search criteria, the call fails. This is a restriction of the PeopleSoft server.


Get

Use the Get interaction to retrieve properties based on the input key parameters (key1, key2, ... keyn). The output parameter is a structure containing the properties of the record that matches the key parameters. If the Component Interface has only one instance without a key, then the Get interaction does not contain any key parameters.

See Also:

"Find"

Syntax

Get (key1, key2, ... keyn, properties)
Get (key1, key2, ... keyn, getHistoryItems, properties)

where:

Description

If the Component Interface does not have a key, as in the case where only one instance exists, then the Get() interaction has the form:

Get(properties) 

See Also:

PeopleSoft documentation for more information on effective dated items

The Oracle Application Server ProcessConnect Get() interaction is available if the PeopleSoft Get interaction in the Component Interface is enabled.

See Also:

"UpdateEx"

Update

Use the Update interaction to update properties based on the input key parameters (key1, key2, ... keyn).

Syntax

Update (key1, key2, ... keyn, properties)

where:

Description

When calling this interaction, the properties of the record corresponding to the keys are replaced by the properties input parameter. All collections within the original record are deleted and replaced by those in the input parameter, properties. The sizes of these collections do not have to match, as the procedure within Update is to delete all existing collection items and then insert the given ones.

If the properties of the Component Interface contain effective dated items below level 0 (that is, a key field with a name of EFFDT) an additional parameter is required, getHistoryItems. This parameter is of type Boolean. If it is set to True then all effective dated items are returned as a sequence (which could be embedded in any level). These include all past effective dated items, the current effective dated item, as well as all future effective dated items. If the getHistoryItems parameter is set to False, only the current and all future effective dated items are returned. If subsequent calls to update on the same instance are to be made, then getHistoryItems should be set to False.

If the Component Interface does not have any keys, as in the case where only one instance can exist, then the Update() interaction has the form:

Update(properties)

The Oracle Application Server ProcessConnect Update() interaction is available if the PeopleSoft Get and Save interactions in the Component Interface are enabled in the PeopleSoft application.

UpdateEx

You use the UpdateEx interaction to update properties based on the input key parameters (key1, key2, ... keyn). Using UpdateEx, it is not possible to delete items in a collection. A separate interaction, DeleteOnly, facilitates deletion.

Syntax

UpdateEx (key1, key2, ... keyn, correctionMode, interactiveMode, properties)

where

Description

When calling this interaction, the properties of the record corresponding to the keys are replaced by the input parameter properties. All collections within the original record are deleted and replaced by those in the input parameter, properties. The sizes of these collections do not have to match, as the procedure within UpdateEx is to delete all existing collection items and then insert the given ones.

If the properties of the Component Interface contain effective dated items, then the properties parameter must contain all future effective dated items, as the original list is replaced. This provides the mechanism for adding and deleting future effective dated items. However, if the properties also contain past effective dated items, an error is returned, as past effective dated items cannot be modified. If the current effective dated item is also included, it is ignored. This permits the client to call Get() with the getHistoryItems parameter set to False, and then modify any future effective dated items or add new future effective dated items, and then passing the structure as parameter for the UpdateEx() interaction.

If the Component Interface does not have any key, as in the case where only one instance can exist, then the UpdateEx() interaction has the form:

UpdateEx(correctionMode, interactiveMode, properties)

The Oracle Application Server ProcessConnect UpdateEx() interaction is available if the PeopleSoft Get and Save interactions in the Component Interface are enabled in the PeopleSoft application.

Component Interface User-Defined Interactions

Oracle Application Server ProcessConnect supports user-defined interactions in Component Interfaces. The signatures are of the form:

myRet=myMethod(parameter1, parameter2, ...)

where:

The parameters can only be input parameters to the interaction. Only one value can be returned from the interaction as the return parameter.

.


Note:

The Component Interface that contains user-defined interactions must have the PeopleSoft Find and Get interactions enabled.


Basic Datatypes

Table 4-1 describes the list of basic types in PeopleSoft and how they map to Oracle Application Server ProcessConnect types. The xsd prefix stands for the namespace http://www.w3.org/2001/XMLSchema.

Table 4-1   Basic Datatypes
PeopleSoft Oracle Application Server ProcessConnect

Char(n)

xsd:string

Date

xsd:date

DateTime

xsd:dateTime

Long(n)

xsd:string

Nbr(n, 0) ; n = 1 to 2

xsd:byte

Nbr(n, 0) ; n = 3 to 4

xsd:short

Nbr(n, 0) ; n = 5 to 9

xsd:int

Nbr(n, 0) ; n = 10 to 14

xsd:double

Nbr(n, 0) ; n > 14

xsd:string

Nbr(n, d); n = 1 to 14; d > 0

xsd:double

Nbr(n, d); n > 14; d > 0

xsd:string

Sign (n, 0) ; n = 1 to 2

xsd:byte

Sign (n, 0) ; n = 3 to 4

xsd:short

Sign (n, 0) ; n = 5 to 9

xsd:int

Sign (n, 0) ; n = 10 to 14

xsd:double

Sign (n, 0) ; n > 14

xsd:string

Sign (n, d); n = 1 to 14; d > 0

xsd:double

Sign (n, d); n > 14; d > 0

xsd:string

Time

xsd:time

Basic Type Special Considerations

The following provides further explanations for datatypes that require special attention.

Strings

Although these types can contain strings of any length, you may still have length limitations at runtime. A cast failure occurs at runtime if a client program is sending a string to PeopleSoft as a key or a property, and if that string is longer than n (refer to the table). This is not true if n is zero. In that case, PeopleSoft accepts strings of any length, up to the maximum as defined by the back-end database.

Datatype Description

Char(n)

Any string of n characters. n is between 1 and 254.

Long(n)

Any string of n characters. n is between 0 and 64000. Long(0) is an unbounded string.

Numeric Types

The Nbr and Sign datatypes in PeopleSoft map to datatype xsd:byte, xsd:short, xsd:int, xsd:double, or xsd:string based on the values of n and d, which specify the number of integral and fractional digits respectively. Due to a current limitation in the PeopleSoft API, output values cannot have a precision that exceeds a float; for example, the return value of the client call can only keep a maximum precision of 7 digits regardless of the client type.

If the PeopleSoft type is Nbr, verify that the client inputs positive values. The precision may be lost if it exceeds the specified n and d. For example, 123.456 loses two digits when converted to a Nbr(3,1).

Date/Time Types

In PeopleSoft, the Date type contains only the date information. Time properties may be defined with different levels of precision:

The Oracle Application Server Integration Adapter for PeopleSoft 8 translates all Date types to xsd:date, all Time types to xsd:time and all DateTime types to xsd:dateTime.

Because the Time part in Date values always allow you to specify up to milliseconds, you may lose precision if you are not aware of the actual precision of the field in the PeopleSoft database.

Date, DateTime and Time types appearing in user-defined interactions are mapped as strings, due to a limitation in PeopleSoft.

Effective Date Properties

PeopleSoft provides the ability to schedule and keep track of planned items by using a special property called Effective Date (abbreviated EFFDT). Such items are either in effect or merely planned, depending on whether their date is before or after PeopleSoft's current date.

If the properties of a Component Interface contain such effective dated items (that is, a field with a name of EFFDT), the adapter makes it possible for callers to retrieve the complete set of values or only those values not yet effective--those that can still be changed.

For Components Interfaces with properties that include an effective date, the adapter provides an additional parameter, called getHistoryItems, to the Get operations. This parameter is of type Boolean and if it is set to True then all effective dated items are returned. These include all past effective dated items, the current effective dated item, as well as all future effective dated items.

If the getHistoryItems parameter is set to False only the current and all future effective dated items are returned. Choose False if your intention is to add or change to these items (because past items cannot be changed).

It is also possible to have multiple Effective Dated items having the same Effective Date. In this situation, an additional property, Effective Sequence (EFFSEQ), must also be provided. The values of the EFFSEQ must be unique to differentiate items with the same Effective Date.

The correctionMode argument in both the UpdateEx and DeleteOnly interactions control whether past effective dated items can be modified. If it is set to True, all items can be modified. Otherwise, modifying past effective dated item generates an exception.

When calling the Update interaction on a Component Interface that has Effective Dated items, you must take care not to include any Effective Dates of a value earlier than PeopleSoft's current Effective Date, or the call fails with an exception. However, the current Effective Dated item can be included as it is bypassed when setting properties. If Effective Sequence exists, then all current Effective Dated items with matching Effective Sequences in the server are skipped when setting properties.


Go to previous page Go to next page
Oracle
Copyright © 2003 Oracle Corporation.

All Rights Reserved.
Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index