}
public boolean checkCouldRollback(Node node) {
// TODO: 如果是catchEvent,也应该可以退回,到时候再说
for (Edge edge : node.getOutgoingEdges()) {
Node dest = edge.getDest();
String type = dest.getType();
if ("userTask".equals(type)) {
if (!dest.isActive()) {
boolean isSkip = isSkipActivity(dest.getId());
if (isSkip) {
return checkCouldRollback(dest);
} else {
// logger.info("cannot rollback, " + type + "("
// + dest.getName() + ") is complete.");
// return false;
return true;
}
}
} else if (type.endsWith("Gateway")) {
return checkCouldRollback(dest);
} else {
logger.info("cannot rollback, " + type + "(" + dest.getName()
+ ") is complete.");
return false;
}
}