ClassDelegate.applyFieldDeclaration(fieldDeclarations, delegate);
if (delegate instanceof ActivityBehavior) {
Context.getProcessEngineConfiguration()
.getDelegateInterceptor()
.handleInvocation(new ActivityBehaviorInvocation((ActivityBehavior) delegate, execution));
} else if (delegate instanceof JavaDelegate) {
Context.getProcessEngineConfiguration()
.getDelegateInterceptor()
.handleInvocation(new JavaDelegateInvocation((JavaDelegate) delegate, execution));