ICleanupActionProvider.CleanupAction (METH)¶
METHOD CleanupAction
CleanupAction
läuft so lange, bis eines der folgenden Ereignisse eintritt: Wenn xComplete
TRUE
wird, wird der Zustand STATE.DONE erreicht. Wenn xAbort
TRUE
wird, wird der Zustand STATE.ABORTED erreicht. Wenn iErrorID
≠ 0 (Zero) wird der Zustand STATE.ERROR erreicht.
Nach einer Ready Condition als Eingang (
iErrorIDProposed
= 0 und xAbortProposed
= FALSE
) sind nur die ZuständeDONE (
xComplete
ist TRUE
) oder ERROR (iErrorID
≠ 0) möglich.Nach einer
Error Condition
als Eingang, ist nur der AusgangszustandERROR (
iErrorID
≠ 0) möglich.Nach einer Abort Condition als Eingang (
xAbortProposed
= TRUE
) sind nur die ZuständeABORTED (
xAbort
ist TRUE
) oder ERROR (iErrorID
≠ 0) möglich.Beispiel
(* common cleanup -- first steps *)
IF xComplete THEN
IF xAbortProposed THEN
(* abort condition -- abort specific cleanup *)
xAbort := TRUE;
xComplete := FALSE;
ELSIF iErrorIDProposed <> 0 THEN
(* error condition -- error specific cleanup *)
iErrorID := SEL(xComplete, 0, iErrorIDProposed);
xComplete := FALSE;
ELSE
(* ready condition -- done specific cleanup*)
END_IF
END_IF
(* common cleanup -- last steps *)
- Ein-/Ausgänge:
Gültigkeitsbereich
Name
Typ
Eingang
xAbortProposed
BOOL
iErrorIDProposed
INT
Ausgang
xComplete
BOOL
xAbort
BOOL
iErrorID
INT