Skip to main content
Version: 4.x

AFTER statement

The AFTER statement calls an action after calling another action.


AFTER action(param1, ..., paramN) DO aspectAction;


The AFTER statement defines an action (let's call it an aspect) that will be called after the specified action.


  • action

    The ID of the action after which the aspect will be called.

  • param1, ..., paramN

    List of action parameter names. Each name is defined by a simple ID. These parameters can be accessed when defining an aspect.

  • aspectAction

    A context-dependent action operator describing the aspect.


changePrice(Sku s, DATE d, NUMERIC[10,2] price)  { price(s, d) <- price; }

// A message will be shown after each call to changePrice
AFTER changePrice(Sku s, DATE d, NUMERIC[10,2] price) DO MESSAGE 'Price was changed';