A routing is a key piece of configuration in service operations. They play different roles depending on if you are using REST or non-REST operations.
REST Routings
Standard Service Operations (non-REST) Routings
NODE the Service Operation can publish and subscribeA routing is where you can turn on or off logging. By default, a Synchronous operation will not log it’s request.
Todo
Why no Async logging?
One usage scenario that is not as commonly understood is the “local-to-local” routing. This is where a business event in the local database creates a service operation and the same local database subscribes to that message and does some processing.
In HCM, the USER_PROFILE service operation has a local subscription which runs USER_PROFILE1:HCM_Refresh_SJT_OPR_CLS:onNotify. This allows HCM to “watch” for changes to user profiles and update flattened row-level security tables without modifying PeopleTools objects.
The HCM group could have placed this code in the USERMAINT.GBL.SavePostChange component PeopleCode, but that would require modifying a PeopleTools object that should be identical across all PeopleSoft applications (FS, HCM, CRM, etc.). The local-to-local routing solves this cleanly.
Watching for business events without intrusive customizations. Since activating a routing is just an entry in an IB setup table, it is not really a customization. A routing tells the integration engine to “run this code when you get a message like X.”
Background tasks outside the Process Scheduler. You can use a local-to-local routing as a queue to offload processing to a background thread. For example, if a user uploads a file with thousands of student IDs and you need to update 3C tables for each, doing this at save time would time out. Instead, publish a local service operation at save time, and the subscription handler updates the 3C tables asynchronously via Component Interface – without consuming Process Scheduler slots.
Loosely coupled architecture between modules. Instead of tightly coupling termination logic in the HR component’s SavePostChange, you can subscribe to the WORKFORCE_SYNC message and have subscription code inspect the message and lock out user accounts in response to termination events. If this functionality is no longer wanted, just deactivate the subscription handler instead of migrating a code change.
Service Operation Routings be sure to never use “Any to Local” routings. Always explicitly define your nodes in the routings to tell the systems what integrations go where.
Chris Malek s 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