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();
}
Aggregations