0

I have action in webflow as follows,

@Component(value = "xyzFlow")
public class XyzFlow extends MultiAction {

    public Event generateOtac(RequestContext context) {
        ..........
        ..........
        return success();
    }
}

And corresponding action,

<action-state id="generateOtac">
    <evaluate expression="xyzFlow.generateOtac" />
    <transition on="success" to="otac" />
    <transition on="error" to="input" />
</action-state>

Also a logging aspect defined,

<aop:aspect ref="myLoggingAspect">
    <aop:pointcut id="cutLogging" expression="execution(* com.package.*.*(..))" />
    <aop:around pointcut-ref="cutLogging" method="log" />
</aop:aspect>

Seems like, aop and webflow methods can't co-exist. It threw error,

HTTP Status 500 - Request processing failed; nested exception is org.springframework.webflow.execution.ActionExecutionException: Exception thrown executing [AnnotatedAction@31fe8769 targetAction = com.package.XyzFlow@3a4c156, attributes = map['method' -> 'generateOtac']] in state 'generateOtac' of flow 'xyz-flow' -- action execution attributes were 'map[[empty]]'

I had hard time finding the cause. But once I removed aspect, all the actions started working.

Is there any other settings to me made to work this out?

Aspect code,

public class LoggingAspect
{
    public Object log(ProceedingJoinPoint call) throws Throwable
    {
        System.out.println("logging aspect: entering method [" + call.toShortString()
                            +"] with param:"+ Arrays.asList(call.getArgs()) );

        Object point =  call.proceed();

        System.out.println("logging aspect: exiting method [" + call.toShortString()   
                            + "with return as:" +point);        

        return point;
    }

}
Dileepa
  • 1,019
  • 1
  • 15
  • 40
  • Post the code for your aspect. – M. Deinum Sep 16 '14 at 09:50
  • Edited to include aspect code. – Dileepa Sep 16 '14 at 10:21
  • I suspected the call to `proceed` to be missing. By default spring uses interface based proxies, if I recall correctly `MultiAction` implements interface. So this might result in the fact that your method isn't available anymore. You might want to try to force the use of classbased proxies (and I suggest the use of one of the Spring provided `AbstractMonitoringInterceptor` classes. Saves you maintaining your own interceptor. – M. Deinum Sep 16 '14 at 10:47

0 Answers0