Search in sources :

Example 1 with BaseJavaDelegate

use of org.finra.herd.service.activiti.task.BaseJavaDelegate in project herd by FINRAOS.

the class HerdDelegateInterceptor method handleInvocation.

@Override
public void handleInvocation(DelegateInvocation invocation) throws Exception {
    // So if the invocation target is a sub-class of BaseJavaDelegate, autowire the Spring beans.
    if (invocation.getTarget() instanceof BaseJavaDelegate) {
        BaseJavaDelegate javaDelegate = (BaseJavaDelegate) invocation.getTarget();
        if (!javaDelegate.isSpringInitialized()) {
            autowireCapableBeanFactory.autowireBean(javaDelegate);
            javaDelegate.setSpringInitialized(true);
        }
    }
    invocation.proceed();
}
Also used : BaseJavaDelegate(org.finra.herd.service.activiti.task.BaseJavaDelegate)

Aggregations

BaseJavaDelegate (org.finra.herd.service.activiti.task.BaseJavaDelegate)1