Wednesday, February 14, 2018

Integration broker message going to done with no action

If IB messages are just going straight to done without running the handler, it can be corrected by regenerating the routings on the service operations page.

PeopleTools > Integration Broker > Integration Setup > Service Operations

General tab

Under the Routing Actions Upon Save section hit Regenerate local-to-local  or any-to-local if applicable then hit save and it should work at that point.

Remove The PeopleCode program executed an error statement

This annoying message text can be removed by using:

error msggettext(&validMessageSet,&validMessageNum,"alt error text");

If you don't want  to define every error message in the catalog you can setup a generic
message as %1 and just pass a bind parameter.

Error MsgGetText(23000, 29, &errorString, &errorString);

Thursday, January 28, 2010

5 Reasons Peoplecode Sucks

5. No Overloading operators.
No overloaded object constructors and methods. This isn't a huge deal, more just an annoyance if you come from another language that uses this feature (most!).


4. Code is stored in the database.

First of all, this is very unorthodox and it hurts performance. It also prevents you from using modern tools like source control and therefore version history of a block of code is maintained with comments. Database refreshes are unnecessarily complex because code needs to be moved from base to base so it isn't lost (and sometimes it is anyway).

3. Poor IDE
There are a few nice things about the Peoplecode editor like syntax highlighting and shortcuts with ^, but the lack of autocomplete puts it years behind more modern IDEs like Eclipse or Netbeans. Another annoyance is the inability to do a side by side of two classes in the same application package. Also, many modern IDEs accommodate ANT or MAVEN scripts that can automate unit tests and directly launch the code being worked on. Can't do anything like that in Peopletools.

2. Good for CRUD apps, bad for everything else.
Sure, you can slap together a one page crud app in a day but what is the standard way to make a multipage form? There isn't one, so you are on your own and it is clumsy. Also, try debugging a delivered application that isn't a single page CRUD app and you'll realize that even the people who created Peoplecode don't have a standard way to make multipage form.


1. Poor Community

The Peoplesoft developer community is much smaller than the Java or C# developer communities. Java is constantly improving because of community efforts like Spring.
Peoplecode is more of a what-you-see-is-what-you-get language. Nobody is going to create open source solutions for a proprietary language. Any time you have a problem, you are likely blazing the trail.

Monday, November 9, 2009

Application Package Interfaces are useless in Peoplesoft

Let's say I want to mock up a person interface for a couple of implementations.
This is a very basic example:


interface Person
method getPerson() returns string;

end-interface;


Ok now let's move down to the implementation

Class MyPerson implements Person

end-class;

method getPerson
return "here is your person";
end-method;


This returns an "undeclared method" error in peopletools.
Peopletools does accept this, however:

Class MyPerson implements Person
method getPerson() returns string;
end-class;

method getPerson
return "here is your person";
end-method;


The method still needs to be declared...so remind me again why I should go to the trouble of declaring an interface when it saves no time during the implementation.

Monday, July 6, 2009

Autoincrement a Field

The problem: automatically incrementing a numeric field. The Row ID should show up for each new row as it is created. Peoplesoft likes to use a system table to autoincrement, this seems unnecessary for a stand alone page.

I tried using the delivered function GetNextNumber and it's siblings. These seemed to work some of the time, but break if I deleted a row.

My solution:

/* In the rowinit event for the field we want to autoincrement. Set the field property to display only. */
If None(MY_REC.MY_ID) Then
MY_REC.MY_ID = GetRowset().ActiveRowCount
End-If;


From my testing, this has worked flawlessly.

Thursday, June 4, 2009

Odd Transactions using CI's in App Engine

App Engines are only supposed to issue commits after a step or later. I'm currently writing single step peoplecode programs that use CI's.

The way it was programmed, when an error occurred, a rollback was issued.

Well errors were happening but rows were still being saved off to some of the tables.

The culprit was a CI calling an App Engine and that App Engine was completing steps (and therefore calling DB commits).

Just something to look out for.

Monday, March 9, 2009

Error retrieving Application Engine Component

After creating a brand new App Engine in a dev environment and getting it running successfully in the dev environment, I received the following error when it was migrated to test:


Error retrieving Application Engine (ProgramName).MAIN component: Step Step01, PeopleCode


I've seen errors like this before. Usually the reason this happens is a step on the App Engine wasn't included in the project. In Tools, I reinserted all the definitions for the app engine and migrated it again only to get the same error.

Next I replaced the entire Peoplecode section in the app engine with this:

Exit(0);


The program finished successfully in test but after replacing the exit statement with the Peoplecode that actually does something, I got the error again. This was strange to me because the error indicated that there was a structural problem with the App Engine.

The only thing left to do was double check the app package imports. After reinserting all of the application package definitions (and sub definitions) and moving the program up, the program worked fine.

This kind of problem can occur if new definitions aren't saved to the project because of a Peopletools crash or something similar. For example, a new app package is created and the program and project are saved. Next, a new class is created and saved and Tools is shutdown without saving the project. The class still exists in the dev environment but it isn't part of the project.

Integration broker message going to done with no action

If IB messages are just going straight to done without running the handler, it can be corrected by regenerating the routings on the service ...