Clone method: Message class
Syntax
Clone()
Description
The Clone method creates an identical copy of the message, copying the data tree of the message executing the method. The Clone function sets the following properties for the resulting message object, based on the values set for the message definition created in Pure PeopleSoft Internet Architecture:
-
Name
-
QueueName
-
IsOperationActive
Other properties are set when the message is published or subscribed to (TransactionID, PubNodeName, and so on), or are dynamically generated at other times (Size, IsEditError, and so on.)
Clone creates a unique version of the message. If the original message changes, it is not reflected in the cloned object.
Parameters
None.
Returns
A message object.
Example
Clone could be used in a Hub and Spoke messaging environment. The Hub node uses this method during notification processing to publish a copy of the messages it receives from the Spokes.
&Msg = %IntBroker.GetMessage();
&Rowset = &Msg.GetRowset();
&Clone = &Msg.Clone();
%IntBroker.Publish(&Clone);
The hub's publication routing rules are then used to determine which spokes receive the message.