private void enter(final StateEnum state, final C context) {
        if (context.isTerminated()) {
            return;
        }

        try {
            // first enter state
            if (isTrace())
                log.info("when enter %s for %s <<<", state, context);

            handlers.callOnStateEntered(state, context);

            if (isTrace())
                log.info("when enter %s for %s >>>", state, context);

            if (transitions.isFinal(state)) {
                doOnTerminate(state, context);
            }
        } catch (Exception e) {
            doOnError(new ExecutionError(state, null, e,
                "Execution Error in [whenEnter] handler", context));
        }
    }