Copyright © Cloud Software Group, Inc. All Rights Reserved
Copyright © Cloud Software Group, Inc. All Rights Reserved


Chapter 7 Configuring Advanced Topics : Implementation of Keys in the TIBCO Adapter for PeopleSoft

Implementation of Keys in the TIBCO Adapter for PeopleSoft
PeopleSoft Component Interfaces become schemas in the adapter. When applying a PeopleSoft Component Interface to a Subscription Service or a Request-Response Service in the adapter, the fields in the CREATEKEYS (if applicable), GETKEYS and FINDKEYS buckets in every Component Interfaces definition hold a special significance as described below.
FINDKEYS
The adapter exposes the FINDKEYS functionality of PeopleSoft Component Interface technology as a feature which can be used with the adapter's Request-Response Service. If the FINDKEYS values are specified in the incoming request, they take precedence over any GETKEYS or CREATEKEYS values specified. The adapter's Request-Response Service uses the same to query PeopleSoft and return a sequence of FINDKEY keys with values, which satisfy the query criterion, as a reply. Please note that any other part of the incoming request (GETKEYS, CREATEKEYS or PROPERTIES) is ignored.
Fields in FINDKEYS should be a superset of fields in GETKEYS() as the fields under these will decide the query criterion.
GETKEYS
The adapter primarily uses GETKEYS to update a particular record in PeopleSoft. For Request-Response Service, if the FINDKEYS values are not specified in the incoming request, the adapter looks for GETKEYS values. For a Subscription service, the adapter by default looks for GETKEYS and ignores the FINDKEYS completely.
If the GETKEYS values are specified (if not specified, see CREATEKEYS), the adapter queries PeopleSoft to check if the record exists. If the record exists, the adapter updates that record in PeopleSoft fields with values specified under the PROPERTIES keys.
The GETKEYS keys should be a subset of the FINDKEYS keys. This is to avoid an error scenario wherein the adapter is trying to search a record with a key which is not a part of FINDKEYS in the CI definition.
If the record does not exist, the adapter looks for CREATEKEYS (in such a scenario see CREATEKEYS).
CREATEKEYS
The adapter primarily uses CREATEKEYS to create a record in PeopleSoft. If neither GETKEYS nor FINDKEYS are specified in the incoming requests (or due to the conditions arising out of the two scenarios described in GETKEYS), the adapter looks for CREATEKEYS in the incoming request.
If specified, the adapter queries PeopleSoft to check if the record already exists. If the record is not found, the adapter creates a new record with the CREATEKEYS fields as primary fields and PROPERTIES keys as values for the non-primary fields. If the record already exists, an error is thrown by the adapter saying CREATEKEYS failed.
The CREATEKEYS should be a subset of the FINDKEYS keys. This is to avoid an error scenario wherein the adapter is trying to search a record with a key which is not a part of FINDKEYS in the CI definition.
Each CI can have multiple levels up to Level 3. In this case, the adapter mandates the occurrence of key fields at all levels in this scenario for performing the CREATE, UPDATE, DELETE or FIND operations successfully at all levels.
In case of the Publication Service (CI based as well as Application Messaging based), the adapter populates the PROPERTIES with the values extracted from the parsed XML (obtained from the TIB_CI_MQUEUE table). The GETKEYS, CREATEKEYS or FINDKEYS hold no significance whatsoever.
Valid Operation Codes for the Adapter
PeopleSoft Component Interface can have multiple levels up to Level 3. The adapter can INSERT, UPDATE or DELETE the records at all these levels. In these case, the key fields should be present at all levels and the user needs to provide the operation code at all levels.
Valid values for OPRN_CODE for CREATEKEYS and GETKEYS scenario are:
UPDATE — U
INSERT — I
DELETE — D
CREATEKEYS Scenarios
For all CREATEKEYS scenarios, specify I as the value for OPRN_CODE for all the records in the request.
GETKEYS Scenarios
1.
2.
To insert a new record under an existing record, specify I as the OPRN_CODE for the record to be inserted. If the new record to be inserted is not a Level1 record, specify U as the OPRN_CODE for the parent record(s) under which the new record is inserted in the following format:
Level1 record - 'U'
   Level2 record - 'I'
3.
To delete a record under an existing record, specify D as the OPRN_CODE for the record to be deleted. If the record to be deleted is not a Level1 record, specify U as the OPRN_CODE for the parent record(s) from which the record is to be deleted in the following format:
Level1 record - 'U'
   Level2 record - 'D'
4.
Level1 record - 'I'
   Level2 record - 'I'
      Level3 record  - 'I'
For some CIs, PeopleSoft by default creates child records while inserting a new record. For example, while inserting a new Level1 record for some CIs, PeopleSoft creates Level2 and Level3 records by default. In such a scenario specify the value for the OPRN_CODE in the following format:
Level1 record - 'I'
   Level2 record - 'U'
      Level3 record  - 'U'

Copyright © Cloud Software Group, Inc. All Rights Reserved
Copyright © Cloud Software Group, Inc. All Rights Reserved