ICleanupActionProvider.CleanupAction (METH)¶
METHOD CleanupAction
CleanupAction is running until one of the following events occurs:
When xComplete is TRUE the state STATE.DONE is reached.
When xAbort is TRUE the state STATE.ABORTED is reached.
When iErrorID ≠ 0 (Zero) the state STATE.ERROR is reached.
After a Ready Condition as input (
iErrorIDProposed = 0 and xAbortProposed = FALSE), only the output statesDONE (
xComplete is TRUE) or ERROR (iErrorID ≠ 0) are possible.After a Error Condition as input (
iErrorIDProposed ≠ 0), only the output stateERROR (
iErrorID ≠ 0) is possible.After a Abort Condition as Input (
xAbortProposed = TRUE), only the output statesABORTED (
xAbort is TRUE) or ERROR (iErrorID ≠ 0) are possible.Example
(* 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 *)
- InOut:
- Scope - Name - Type - Input - xAbortProposed- BOOL- iErrorIDProposed- INT- Output - xComplete- BOOL- xAbort- BOOL- iErrorID- INT
