Chris Malek is a PeopleTools® Technical Consultant with two decades of experience working on PeopleSoft enterprise software projects. He is available for consulting engagements.About Chris Work with Chris
Introducing a small but powerful PeopleSoft bolt-on that makes web services very easy. If you have a SQL statement, you can turn that into a web service in PeopleSoft in a few minutes.Read More & Purchase
This section discusses a subtle practice that can add immense value for production support and debugging. It adds a metadata node to return data about the context of the request.
Let’s imagine that you have a simple request/reply asynchronous service operation.
EMPLIDas a parameter
The important part I want to highlight here is the
meta element where we return:
dbname- The name of the database this ran in.
toolsVer- The tools version that this ran in.
psftTransactionId- The PeopleTools Integration Broker GUID that can be used to lookup the request in the IB monitoring tables.
OPRIDrunning the PeopleCode.
responseDTTM- The date-time this was run
dbType- The database type.
request*- A singular node or nested node that contains the request parameters. This may not be feasible for large payloads.
I have code running at many different clients. When one of them experiences an issues all that information can be extremely useful and expedite troubleshooting. I often get a pasted response or screenshot of the PeopleSoft output from a user mentioning an issue. When these metadata elements are present, I have found it can answer many up front questions that may not have been provided. A user may just say “the web service is not working” and send a screenshot of the response. This response metadata can quickly provide that information up front without any back and forth. Perhaps the person has the wrong URL and is connecting to the wrong system. If you have they database name and the user they are authenticating as you can rule that out straight away. Additionally, if you echo back the request parameters typos and other simple but inevitable errors are quickly spotted.
Here is the HTTP signature of the request.
GET http://test.psft.cedarhillsgroup.com/PSIGW/RESTListeningConnector/PSFT_CS/CHG_PERSON.v1/SF0001 HTTP/1.1 Authorization: Basic .....
Here is a sample response. Take a look at lines 13 to 21.
Here is a basic handler to output the meta-data.
If you spend a few extra minutes adding this or creating an application class to append this information to all responses you will benefit from it.