|
@@ -32,6 +32,7 @@ import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
+import java.lang.reflect.InvocationTargetException;
|
|
|
import java.lang.reflect.Method;
|
|
|
import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
@@ -329,6 +330,11 @@ public class FlowProcessServiceImpl implements FlowProcessService {
|
|
|
try {
|
|
|
invokeMethod(flowDelegate, handlingMethod);
|
|
|
} catch (Exception e) {
|
|
|
+ if (e instanceof InvocationTargetException) {
|
|
|
+ Throwable targetException = ((InvocationTargetException) e).getTargetException();
|
|
|
+ log.error("跳转节点方法异常", targetException);
|
|
|
+ throw new ServiceException("跳转节点方法异常:" + targetException.getMessage());
|
|
|
+ }
|
|
|
log.error("跳转节点方法异常", e);
|
|
|
throw new ServiceException("跳转节点方法异常:" + e.getMessage());
|
|
|
}
|
|
@@ -418,6 +424,11 @@ public class FlowProcessServiceImpl implements FlowProcessService {
|
|
|
FlowThreadLocalUtil.getCurrentData());
|
|
|
}
|
|
|
} catch (Exception e) {
|
|
|
+ if (e instanceof InvocationTargetException) {
|
|
|
+ Throwable targetException = ((InvocationTargetException) e).getTargetException();
|
|
|
+ log.error("结束节点方法异常", targetException);
|
|
|
+ throw new ServiceException("结束节点方法异常:" + targetException.getMessage());
|
|
|
+ }
|
|
|
log.error("结束节点方法异常", e);
|
|
|
throw new ServiceException("结束节点方法异常:" + e.getMessage());
|
|
|
}
|