CreateMessage function
Syntax
CreateMessage(Operation.srvc_op_name [, message_type])
Description
Use the CreateMessage function to instantiate a Message object that refers to a message definition associated with a service operation. The CreateMessage function sets the following properties for the resulting Message object, based on the values set for the message definition:
-
Name
-
QueueName
-
Active
Other properties are set when the message is published or subscribed to (TransactionID and so on,) or are dynamically generated at other times (Size, EditError, and so on.)
For rowset-based messages, CreateMessage also sets the LANGUAGE_CD field in the level 0 PSCAMA record for a message based on the USERID default language group. If the message is being published from a component, the language code is set to the USERID language code for the component. If CreateMessage is called from a PeopleSoft Application Engine program, the language code of the user who started the batch process is used.
Parameters
| Parameter | Description |
|---|---|
|
Operation. srvc_op_name |
Specify the name of the service operation you want to create a Message object for as a string value. |
|
message_type |
Specify the type of message that you want to create. Valid values are: |
| Value | Description |
|---|---|
|
%IntBroker_Request |
A request message. This is the default. |
|
%IntBroker_Response |
A response message. |
|
%IntBroker_Fault |
A fault message. |
Returns
A Message object.
Example
The following example creates a request message &MSG associated with the DELETE_USER_PROFILE service operation.
Local Message &MSG;
&MSG = CreateMessage(Operation.DELETE_USER_PROFILE);