Consultor Eletrônico



Kbase P91783: Trigger does not respond to internal procedure RETURN NO-APPLY
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   9/24/2004
Status: Unverified

SYMPTOM(s):

Trigger does not respond to internal procedure RETURN NO-APPLY

Nested trigger procedure does not RETURN control back to trigger.

Trigger is defined as:

ON event ANYWHERE PERSISTENT RUN proc1 ......

PROCEDURE proc1:
RUN proc2.
END PROCEDURE.

PROCEDURE proc2:
RETURN NO-APPLY.
END.

CAUSE:

The problem is because of the depth of the procedures that are being called by the trigger.

Initially the trigger calls the procedure proc1, which in turn calls the proc2 procedure. Although the proc2 procedure performs a RETURN NO-APPLY, this return is simply passing control back to the proc1 procedure, and the NO-APPLY is never actually recognized by the trigger.

FIX:

Move the RETURN NO-APPLY into proc1, effectively removing procedure proc2. Or test the return string value in proc1 and then perform the RETURN NO-APPLY depending on this value:

PROCEDURE proc1:
RUN proc2.
IF RETURN-VALUE = "NO-APPLY" THEN
DO:
RETURN NO-APPLY.
END.
END PROCEDURE.

PROCEDURE proc2:
RETURN "NO-APPLY".
END.