@Override public EventVO interceptStart(AnnotatedElement element) { EventVO event = null; Method method = (Method) element; ActionEvent actionEvent = method.getAnnotation(ActionEvent.class); if (actionEvent != null) { boolean async = actionEvent.async(); if (async) { UserContext ctx = UserContext.current(); long userId = ctx.getCallerUserId(); long accountId = ctx.getAccountId(); long startEventId = ctx.getStartEventId(); String eventDescription = actionEvent.eventDescription(); if (ctx.getEventDetails() != null) { eventDescription += ". " + ctx.getEventDetails(); } EventUtils.saveStartedEvent( userId, accountId, actionEvent.eventType(), eventDescription, startEventId); } } return event; }