Class<?> clazz = exception.getClass();
while (clazz != null) {
ExceptionScopeInstance exceptionScopeInstance = (ExceptionScopeInstance)
resolveContextInstance(ExceptionScope.EXCEPTION_SCOPE, clazz.getName());
if (exceptionScopeInstance != null) {
exceptionScopeInstance.handleException(clazz.getName(), exception);
return;
}
clazz = clazz.getSuperclass();
}
if (exception instanceof JbpmException) {