Application Engine | Deleting ‘stuck’ run controls due to a prior ‘No Success’
A. All Processing Suspended
If you’ve ever created an App Engine from scratch, you will no doubt have come across the problem where your AE goes to ‘No Success’ at some point. Then, when you try to re-run the App Engine using the same run control as before, you get a message such as this:
All Processing Suspended: Restart OPRID=PS, RUNID=RUN01 Message Set Number: 108 Message Number: 503 Message Reason: All Processing Suspended: Restart OPRID=PS, RUNID=RUN01
B. Restartable App Engines
One of the standard App Engine properties (in File -> Definition Properties -> Advanced) is a Y/N checkbox called ‘Disable Restart’. This specifies whether or not the App Engine has the ability to restart itself from an ‘abend’, a point of failure (restartable App Engines also have other requirements, such as a permanent state record, but this subject is beyond the scope of the current post). While a restartable App Engine can be handy for certain requirements – such as processing thousands of records over the course of many hours – in many cases the option is overkill for a more modest programming requirement. And of course, here at Barefoot PeopleSoft we are always interested in keeping things as simple as possible.
Rather annoyingly, however, when you first create an App Engine in App Designer, the ‘Disable Restart’ option is NOT ticked by default, meaning the App Engine is initially defined as ‘restartable’. If, like me, you usually forget to turn this option on, you will soon discover that a run control cannot be reused once it has gone to ‘No Success’.
C. Resurrecting Stuck Run Controls
While the ‘Disable Restart’ option is easy enough to turn on in the App Engine properties (refer to navigation above), what about existing run control IDs that have gone to ‘No Success’? Are these lost forever, or can they be recovered and re-used in any way? Fortunately, they can, by running the delete statement below. This purges all ‘stuck’ run control records for your user ID, meaning you can start again from scratch with your favoured run control ID (which, for many people, is often the run control ID of ‘1’… the habit is hard to break).
delete from ps_aeruncontrol where oprid = 'USER_ID';
Alternatively, you can remove the stuck run controls by navigating to the following page in the system:
PeopleTools -> Application Engine -> Manage Abends