Contents

OnRouteReceive

The optional OnRouteReceive handler allows you to run some pre-processing filtering code before the actual “real” handler code triggers to prevent the data from getting to the handlers that would process the message. This type of handler is not often implemented. This can be thought of as a “filter” event that allows you to have seperate logic for filtering the message. You could place this same logic in your normal OnRequest handler as well. This just allows you to seperate out the logic in different layers. A good use of this handler could be some sort of custom authentication.

The OnRouteReceive method returns a boolean value to determine if this node could accept this message. The OnRouteReceive can inspect the message object passed as it’s only paramter to look at the data.

  • If the method returns true then the message is passed to the OnRequest handler for a Synchronous SO.
  • If the method return false then the Integration Gateway will return a message that resembles this:
HTTP/1.1 200
status: 200
date: Sun, 29 Oct 2017 16:34:49 GMT
content-length: 413
content-type: text/xml; charset=UTF-8
transactionid: 1506b539-bcc7-11e7-8c89-f1fdee7c0e02

<?xml version="1.0"?>
<IBResponse type="error">
  <DefaultTitle>Integration Broker Response</DefaultTitle>
  <StatusCode>20</StatusCode>
  <MessageSet>158</MessageSet>
  <MessageID>957</MessageID>
  <DefaultMessage>OnRouteReceive for message &#037;1 did not accept the request on node &#037;2.</DefaultMessage>
  <MessageParameters>
    <Parameter>CHG_SYNC_UTEST</Parameter>
    <Parameter>PSFT_HR</Parameter>
  </MessageParameters>
</IBResponse>

The basic implementation of the OnRouteReceive handler looks like this.

import PS_PT:Integration:IRouter;

class syncUTestRouter implements PS_PT:Integration:IRouter
   method OnRouteReceive(&message As Message) Returns boolean;
end-class;

method OnRouteReceive
   /+ &message as Message +/
   /+ Returns Boolean +/
   /+ Extends/implements PS_PT:Integration:IRouter.OnRouteReceive +/

   Return true;
end-method;

You would never actually implement a handler in production that look like that. You would actually have some code that is parsing the inbound &message parameters and performing some logic to determine if the local processing database should accept this message.

OnRouteReceive

Important: This does NOT seem to fire on local operation instances. It only triggers for external nodes.

OnRouteReceive will pass in a message to your derived application class method. The return should be a Boolean. FALSE = The Operation will not run locally TRUE = The Operation will run locally.

interface IRouter
   method OnRouteSend(&message As Message) Returns integer;
   method OnRouteReceive(&message As Message) Returns boolean;
   method OnError(&request As Message);
   property array of any destinationNodes;
end-interface;

Author Info
Chris Malek

Chris Malek is a PeopleTools® Technical Consultant with over two decades of experience working on PeopleSoft enterprise software projects. He is available for consulting engagements.

Work with Chris
PeopleSoft REST APIs in Minutes, Not Months
PeopleSoft Simple Web Services (SWS)

SWS turns SQL into production REST APIs — ready for AI, modern apps, and partner integrations. One install, unlimited potential.

  • Configuration-driven, no coding required
  • JSON, XML, and CSV output
  • Works across all PeopleSoft pillars
  • Built on 25+ years of PeopleSoft expertise
Looking for pain-free PeopleSoft web services?
PeopleSoft Simple Web Services (SWS)

A powerful PeopleSoft bolt-on that makes REST web services easy. You bring the SQL, SWS handles the rest.

  • Go from idea to production in minutes
  • Zero code migrations after install
  • JSON, XML, and CSV output supported
  • No PeopleCode or Integration Broker expertise required
Stop Building PeopleSoft Web Services the Hard Way
PeopleSoft Simple Web Services (SWS)

Traditional PeopleSoft web services cost $3,600–$13,000 each to develop. SWS deploys production REST APIs in under 5 minutes through configuration alone.

  • No PeopleCode or Integration Broker expertise required
  • Works across Campus Solutions, HCM, and Financials
  • Built-in pagination, caching, and nested data structures
  • Trusted by institutions across higher education and government
PeopleSoft REST APIs for AI, Modern Apps, and Integrations
PeopleSoft Simple Web Services (SWS)

Turn PeopleSoft data into clean REST APIs for AI integrations, modern applications, and vendor data feeds. Configuration-driven — no PeopleCode required.

  • Deploy production APIs in under 5 minutes
  • AI and LLM ready (RAG, chatbots, intelligent search)
  • JSON, XML, and CSV output
  • Zero modifications to delivered PeopleSoft objects