| Recovery System |
Subsystem list |
Top level |
RECgroup contains an ordered list of
other recovery objects.
Its recovery target is the sum of the recovery targets of the recovery
objects it contains.
Likewise, its base state is the sum of the base states of the
recovery objects it contains.
This means that when a RECgroup is invoked during one of
the four recovery phases, it in turn invokes each recovery object
contained in it, in order.
RECgroup.
In other words, given a recovery object R1, and two RECgroups G1 and G2,
R1 can appear at most once in G1, and at most once in G2.
winclass RECgroup : RECbase
boolean
| IsHappy
| (RECphase ePhase, boolean logFirstFailure)
|
void
| BeHappy
| (RECphase ePhase)
|
list of RECwindowUid
| VetoWindowClosure
| (RECphase ePhase,
list of RECwindowUid luWindowsToClose)
|
boolean
| MakeHappy
| (RECphase ePhase,
RECobject r)
|
void
| InsertBefore
| (RECobject r, RECobject insertBefore optional)
|
void
| InsertAfter
| (RECobject r, RECobject insertAfter optional)
|
void
| Remove
| (RECobject r)
|
void
| Replace
| (RECobject rOld, RECobject rNew)
|
list of RECobject lrObjects;
RECbase.IsHappy.
BeHappy methods.
Keeps looping as long as there is any contained recovery object that
isn't happy, or until nothing changes from one loop iteration to another.
Returns when all the contained recovery objects are happy.
Raises the exception X_REC_CANT_MAKE_ALL_HAPPY if it
determines that one or more contained recovery objects aren't going to become happy.
For more information, see RECbase.BeHappy.
VetoWindowClosure method of all the contained recovery objects.
For more information, see
RECbase.VetoWindowClosure.
RECgroup::BeHappy when one of the
contained objects' BeHappy methods raises an exception.
This method tries to alter the state of the application in such a way
that the contained object's BeHappy method can succeed.
The exception information can be obtained from the built-in 4Test
routines ExceptNum and ExceptData.
If MakeHappy returns TRUE, RECgroup::BeHappy
will call the contained object's BeHappy method again.
If MakeHappy returns FALSE, RECgroup::BeHappy
will assume that the contained object cannot be made happy, at least
this time around.
RECgroup::MakeHappy itself always returns FALSE.
It is intended to be overridden.
boolean MakeHappy (RECphase ePhase,
RECobject rObj);
ePhase
rObjBeHappy method raised an exception.Returns
rObj happy, in which case
rObj.BeHappy will be called again.rObj happy.
WelcomeToGroup
method of the inserted object.
Adding a new recovery object to the group does not affect the application
until the group is invoked (i.e. during recovery).
The recovery object must not be already contained in the group.
void InsertBefore (RECobject rNew, RECobject rBefore optional);
rNewrBefore
window RECgroup g; // initially empty
RECobject a, b, c, d;
g.InsertBefore(a);
// group now contains: { a }
g.InsertBefore(b, a);
// group now contains: { b a }
g.InsertBefore(c);
// group now contains: { c b a }
g.InsertBefore(d, b);
// group now contains: { c d b a }
WelcomeToGroup
method of the inserted object.
Adding a new recovery object to the group does not affect the application
until the group is invoked (i.e. during recovery).
The recovery object must not be already contained in the group.
void InsertAfter (RECobject rNew, RECobject rAfter optional);
rNewrAfter
window RECgroup g; // initially empty
RECobject a, b, c, d;
g.InsertAfter(a);
// group now contains: { a }
g.InsertAfter(b, a);
// group now contains: { a b }
g.InsertAfter(c);
// group now contains: { a b c}
g.InsertAfter(d, b);
// group now contains: { a b d c }
void Remove (RECobject r);
rWelcomeToGroup
method of the new object.
This operation does not affect the application
until the group is invoked (i.e. during recovery).
void Replace (RECobject rOld, RECobject rNew);
rOldrNew.rNewrOld.RECgroup to specify the initial set of recovery objects.
It is only used the first time the recovery object is invoked
(typically during ScriptEnter);
changing it during script execution will have no effect, once the recovery
object has been used at least once.
The first time the RECgroup is used, it calls the
WelcomeToGroup
method of each object in this list.
list of RECobject lrObjects;
window RECgroup gbMyRecoveryGroup
{
list of RECobject lrObjects =
{
grPRJrecDefault,
grTLrecDefault,
grCMrecDefault,
grCONrecDefault
}
}