A checkpoint is a point during processing you establish to be certain that everything in the processing environment is synchronized and the procedure can restart.
To establish a checkpoint, it is necessary to commit all outstanding database updates and to take a process snapshot.
With most database management systems, any requests for update are saved in some type of temporary storage. The physical database is not actually updated until a commit point is reached.
In the absence of an explicit request for a database commit, updates are not committed until the end of a procedure step's execution.
In a typical restartable procedure step, a commit is explicitly requested by the procedure step every so often during processing, usually after a certain number of operations take place. This means that if there is a restart, you lose only the updates made since the last commit.
A database commit can be initiated by calling an external action block which is hand coded to explicitly execute the commit; so using an external action block is a simple and efficient means of achieving a commit.
In a CA Gen‑generated system, a database commit can also be requested by using an involuted transfer flow on the Dialog Flow Diagram, as shown in the following illustration.
An involuted transfer flow causes the dialog manager to commit all outstanding database requests and reinvoke the procedure logic for the procedure step.
The illustration shows a single-step batch procedure called ACCOUNT UPDATE. Whenever the execution of the ACCOUNT UPDATE Procedure Action Diagram concludes and the value of exit state is PROCESS COMMIT, the CA Gen dialog manager commits all outstanding updates and returns to the beginning of the ACCOUNT UPDATE procedure.
Process snapshot refers to any information that might be required to return the procedure step to its state at the last commit point if there is a restart. Otherwise, duplicate database updates may result. Enough information to allow the procedure step to return to a commit point must therefore be saved each time a commit is issued.
Copyright © 2013 CA.
All rights reserved.
|
|