A job (an AIMMS PRO solver session) may fail, for instance because it ran out of time, ran out of memory, or for some other reason.
As an end-user, you can see which jobs failed in the AIMMS PRO portal. But not all end-users know this or remember to check this.
As a developer, therefore, you may want to notify yourself, or your end-user(s), of failed jobs, such that appropriate action can be taken timely.
Please find enclosed an example of an AIMMS app, whereby the solver session will run out of time after a minute. Its user interface looks like:
In the upper half of this UI the failed jobs of last week are shown. Essential here is a call to the procedure pro::sessionmanager::ListSessionSinceDate and listing only the jobs with a status >= 7 (failures).
In the bottom half job that was launched using button "buttonFail” is shown. To the right, the sp_status is filled in he procedure ServerErrorCallback, which is installed at startup as the procedure to be called upon failure of a job.
The attachment "fail.zip” contains the AIMMS app source for this community article.