Reference‎ > ‎

Rules: Early Action

An Early Action rule is defined by a method with the @EarlyAction annotation:

import com.autobizlogic.abl.businesslogic.annotations.*;

public class CustomerLogic {

    private Customer customer;
    public void myEarlyAction() {
        if (customer.getBalance() > 1000)

This annotation has only one (optional) parameter verbs, which specifies the verb(s) under which this action should execute. It can specify any combination of INSERT, UPDATE or DELETE. If specified, the action will only execute in those conditions. If not specified, the action will always execute.

An Early Action, unlike an Action, it is only invoked once, at the very beginning of the transaction processing.

Early actions are subject to the same restrictions as actions when inserting, updating and deleting persistent objects -- see the reference for Actions for details.

The name of the method does not matter, but the method must be public.