Creating a Response Message
This section provides an overview of the response message and describes how to create messages that:
-
Send optimization status.
-
Send a detailed message.
Understanding the Response Message
For optimization, the message PeopleCode in application server receives the request messages, performs an optimization actions, and sends response OPT_CALL messages. One message uses rowsets built from PT_OPTPARMS records, the other uses rowsets from PT_DETMSGS records. You can use the rowset structures in the next section (Sending Optimization Status) as an example of how to send responses from the message notification PeopleCode in the application server to the application engine program in the process scheduler.
Sending Optimization Status
To send the status of the optimization functions and methods called within the PeopleCode program implementing the OnRequest Integration Broker method, structure the rowset as follows using the PT_OPTPARMS record. The optimization functions and messages are called in response to the request input message. You set key values using the PARMKEY field, and then set a value for that key field in the VALUE field.
| PARMKEY Field | VALUE Field |
|---|---|
|
STATUS |
The return status of the optimization function or method that is called in the message PeopleCode. |
|
DETAILED_STATUS |
The optional detailed status returned by many of the optimization functions and methods. |
Sending a Detailed Message
To send a detailed message, structure the rowset as follows, using the PT_DETMSGS record. You set key values using the PARMKEY field, and then set a value for that key field in the VALUE field.
| PARMKEY Field | VALUE Field |
|---|---|
|
MSGSET |
The message set number. In the case of optimization, the message set number is 148. |
|
MSGNUM |
The name of the detailed message. |
|
PARMCOUNT |
The number of message parameters for the detailed message. There can be up to five parameters. |
|
MSGPARM1 |
The first parameter value. |
|
MSGPARM2 |
The second parameter value. |
|
MSGPARM3 |
The third parameter value. |
|
MSGPARM4 |
The fourth parameter value. |
|
MSGPARM5 |
The fifth parameter value. |