Recognizing failed jobs in your app

  • 5 February 2024
  • 0 replies
  • 33 views

Userlevel 5
Badge +7

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:
 

The UI of the app "fail” that illustrates how to capture failed sessions.

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.


0 replies

Be the first to reply!

Reply


Didn't find what you were looking for? Try searching on our documentation pages:

AIMMS Developer & PRO | AIMMS How-To | AIMMS SC Navigator