public <C extends StatefulContext> void callOnFinalState(StateEnum state, C context) throws Exception {
        Handler h = handlers.get(new HandlerType(EventType.FINAL_STATE, null, null));
        if (h != null) {
            StateHandler<C> contextHandler = (StateHandler<C>) h;
            contextHandler.call(state, context);
        }
    }