Simulating Receiving Messages from External Nodes
You can use PeopleCode to simulate receiving asynchronous messages from external nodes, including running transformations.
Use can use the IntBroker class InboundPublish method to work with rowset-based and nonrowset-based messages.
The following example shows an inbound publish as part of an OnNotify method implementation with a rowset-based message:
Local Message &MSG_REMOTE;
Local Rowset &rs;
&rs = &MSG.GetRowset();
/*create the message to be re-published from a simualted remote node*/
&MSG_REMOTE = CreateMessage(OPERATION.QE_FLIGHTPLAN);
&MSG_REMOTE.IBInfo.RequestingNodeName = "QE_IBTGT";
&MSG_REMOTE.IBInfo.ExternalOperationName = &MSG_REMOTE.OperationName | "." |
&MSG_REMOTE.OperationVersion;
&MSG_REMOTE.CopyRowset(&rs);
&Ret = %IntBroker.InBoundPublish(&MSG_REMOTE);
The following example shows an inbound publish as part of an OnNotify implementation with a nonrowset-based message:
Local Message &MSG_REMOTE;
Local XmlDoc &xmldoc;
Local Rowset &rs;
&xmldoc = &MSG.GetXmlDoc();
/*create the message to be re-published from a simualted remote node*/
&MSG_REMOTE = CreateMessage(OPERATION.QE_FLIGHTPLAN);
/* populate the Remote Message with data to be re-published*/
&MSG_REMOTE.SetXmlDoc(&xmldoc);
%IntBroker.InBoundPublish(&MSG_⇒
REMOTE, Node.REMOTE_NODE);