Wednesday, October 9, 2013

App Package PeopleCode-"There is no current buffer context."

I was tasked with automating a couple of ePerformance Tasks for our end users and one of those tasks was transferring a document to the next supervisor in the chain of command when the supervisor assigned to the document vacates the position.  At first I thought I would just create a CI and replicate what the user does manually, but when I created a CI of the  EP_APPR_XFER component and tried to use it, I got a plethora of .Null errors.  So I did some research and discovered that the component was just calling the TransferDocument method in the Application Package PeopleCode in the EP_FUNCTIONS:EP_Utilities.   So I decide to just write a simple Application engine step to load a rowset of documents reporting to empty positions and call this method.  But what should have been so easy, ran to "No Success"! 

There is no current buffer context. (2,681) EP_FUNCTIONS.EP_Notification.OnExecute Name:Format_EP_E mail PCPC:24289 Statement:421 Called from:EP_FUNCTIONS.EP_Notification.OnExecute Name:EP_Notify Statement:588 Called from:EP_FUNCTIONS.EP_Utilities.OnExecute Name:TransferDocument Statement:343 Called from:ZZ_EPDOCS.XFR.GBL.default.1900-01-01.Step01.OnExecute Statement:22
I really wish Oracle would adopt a standard that Application Package PeopleCode should not be tied to the Component Buffer.  In order to get around this I cloned the entire EP_UTILITIES and removed the references to the Component Buffer.  Now I am a novice when it comes to Application Package PeopleCode.  I have written a few of my own packages, all of which are independent of the component buffer, but I wonder if I should have extended the EP_UTILITIES, of if cloning the package was the best option?

1 comment: