Starting Application Engine Programs from the Beginning

When an Application Engine program ends abnormally, you may have to decide whether you should restart the process or start it from the beginning. As your Application Engine program ran at least part way through, starting over may leave your data in an unknown state. Also, application logic might need to be undone, depending on the stage of the program when it failed, what data the program had committed, and so on.

However, if restart is enabled and you attempt to start a new process that matches the run control ID and user ID for another process, then you receive a suspend error. Because the process instance for these two processes is different, the new request fails. This event usually occurs when a user tries to run the program again after receiving an error on the previous attempt.

To start the program over from the beginning, you can use SQL to delete the row that corresponds to the failed program from the Application Engine run control table and your state record.

To restart an Application Engine program from the beginning:

  1. Open your native SQL editor and manually delete the row in PS_AERUNCONTROL that corresponds to the program you want to start from the beginning.

    Use the following SQL to accomplish this step:

    DELETE FROM PS_AERUNCONTROL
    WHERE OPRID=OPRID
    AND RUN_CNTL_ID=Run_Control_ID
  2. Delete from your state record the row that corresponds to the failed program run.

    Use the following SQL to accomplish this step:

    DELETE FROM PS_MY_AET
    WHERE PROCESS_INSTANCE=Process_Instance

Note:

To restart the program, you can also select Restart Request from the Process Request Details dialog box.