/** * Executes the action. Throws: RuleExecutionException in case of any error * * @param context * The current executing {@link ExecutionContext} * @return A collection of {@link Tags}s * @throws RuleExecutionException * If rule execution fails with an exception. * @see ExecutionContext * @see Tag */ public Collection<Tag> execute(ExecutionContext context) throws RuleExecutionException { try { Object result = ReflectionUtils.invokeMethod(getMethod(), context.getInstance()); return transform(result, context); } catch (Exception e) { throw new RuleExecutionException("Failed to invoke action method (" + getMethod().getName() + ")", context, e); } }