PSCAMA
PeopleTools adds the PSCAMA record to every level of the message structure during processing. It isn’t accessible in the message definition, but you can reference it as part of the Message object in the sending and receiving PeopleCode, and you can see it in the Integration Broker Monitor. PeopleCode processes this record the same way as any other record.
Note:
PSCAMA records are automatically included in messages only if you insert database records to define the message structure. You can use the PeopleCode XmlDoc class to handle an inbound message containing PSCAMA records, but the PeopleCode Message class is much better suited for this.
PSCAMA contains fields that are common to all messages. The <PSCAMA> tag repeats for each row in each level of the transaction section of the message. The sender can set PSCAMA fields to provide basic information about the message; for example, to indicate the message language or the type of transaction a row represents. When receiving a message, your PeopleCode should inspect the PSCAMA records for this information and respond accordingly.
PSCAMA Record Definition
The PSCAMA record definition includes the following fields:
| Term | Definition |
|---|---|
|
LANGUAGE_CD |
Indicates the language in which the message is generated, so the receiving application can take that information into account when processing the message. When sending a message with component PeopleCode, the system sets this field to the user’s default language code. |
|
AUDIT_ACTN |
Identifies each row of data as an Add, Change, or Delete action. |
|
BASE_LANGUAGE_CD |
(Optional.) Indicates the base language of the sending database. This is used by generic, full-table subscription PeopleCode to help determine which tables to update. |
|
MSG_SEQ_FLG |
(Optional.) Supports the transmission of large transactions that may span multiple messages. Indicates whether the message is a header (H) or trailer (T) or contains data (blank). The header and trailer messages don’t contain message data. The receiving system can use this information to determine the start and end of the set of messages and initiate processes accordingly. For example, the header message might cause staging tables to be cleared, while the trailer might indicate that all of the data has been received and an update job should be initiated. |
|
PROCESS_INSTANCE |
(Optional.) Process instance of the batch job that created the message. Along with the sending node and publication ID, the receiving node can use this to identify a group of messages from the sending node. |
|
PUBLISH_RULE_ID |
(Optional.) Indicates the publish rule that is invoked to create the message. This is used by routing PeopleCode to locate the appropriate chunking rule, which then determines to which nodes the message should be sent. Third-party applications can ignore this field. |
|
MSGNODENAME |
(Optional.) The node to which the message should be sent. This field is passed to the Publish utility by the Application Engine program. Routing PeopleCode must look for a value in this field and return that value to the application server. Third-party applications can ignore this field. |
Language Codes
Each message can contain only one language code (the LANGUAGE_CD field) in the first PSCAMA record.
PeopleSoft language codes contain three characters and are mapped to corresponding International Organization for Standardization (ISO) locale codes in an external properties file. This mapping enables the PeopleSoft Pure Internet Architecture to derive certain defaults from the ISO locales that are stored in a user's browser settings. Your PeopleSoft application is delivered with a set of predefined language codes; you can define your own codes, as well.
Note:
There can be only one language code for the entire message. To send messages in multiple languages, send multiple messages.
See Global Technology: Understanding International Preferences.
Audit Action Codes
A PSCAMA record appears following each row of the message. At a minimum, it contains an audit action code (the AUDIT_ACTN field), denoting the action to be applied to the data row. The audit action is required so that the receiving system knows how to process the incoming data.
The valid audit action codes match those that are used in the PeopleSoft audit trail processing: A, C, D, K, N, O, and blank.
The audit action values are set by the system or by the sending PeopleCode to specify that a record should be added, changed, or deleted:
| Audit Action Code | Description |
|---|---|
|
A |
Add a noneffective or effective-dated row. To add an effective-dated row, the value is A. If you populate the row data by using the CopyRowsetDeltaOriginal method in the PeopleCode Message class, an additional record is created with an audit action value of O, containing the original values of the current effective-dated row. |
|
C |
Change non-key values in a row. |
|
D |
Delete a row. |
|
K |
If you change at least one key value in a row (in addition to any non-key values) and then populate the row data by using the CopyRowsetDeltaOriginal or CopyRowsetDelta methods in the Message class, an additional record is created with an audit action value of K, containing the original values of the current effective-dated row. |
|
N |
Change at least one key value in a row (in addition to any non-key values). |
|
O |
If you change non-key values in a row and populate the row data by using the CopyRowsetDeltaOriginal method in the Message class, an additional record is created with an audit action value of O, containing the original values of the current effective-dated row. |
|
Blank |
Default value. If a row’s content hasn’t changed, the value is blank. This audit action code is also used to tag the parents of rows that have changed. |
Other PSCAMA Considerations
You can update values on the PSCAMA record just like any other record in the message definition before sending the message.
The receiving process can access the fields in this record just like any other fields in the message.
The size of the PSCAMA record varies. In particular, notice a difference between the first PSCAMA record and the ones that follow. The first record contains all of the fields, while the other PSCAMA records have only the AUDIT_ACTN field, which is the only field that can differ for each row of data.
Although the first PSCAMA record is always present, not all of the remaining PSCAMA records are sent in the message. If a <PSCAMA> tag is not included for a specific row, you can assume that the row hasn’t changed. In addition, if the <AUDIT_ACTN> tag is blank or null, you can also assume the row hasn’t changed.
If you’re receiving a message that has incremental changes, only the rows that have changed and their parent rows are present in the message.
You can view an example of an outbound message with the PSCAMA records inserted by testing your message definition using the Schema Tester.
See Integration Broker Testing Utilities and Tools: Understanding the Schema Tester Utility.