snaker-core/src/main/java/org/snaker/engine/model/NodeModel.java
public static boolean canRejected(NodeModel current, NodeModel parent) {
		if(parent instanceof TaskModel && !((TaskModel)parent).isPerformAny()) {
			return false;
		}
        boolean result = false;
		for(TransitionModel tm : current.getInputs()) {
			NodeModel source = tm.getSource();
			if(source == parent) {
				return true;
			}
			if(source instanceof ForkModel
					|| source instanceof JoinModel
					|| source instanceof SubProcessModel
					|| source instanceof StartModel) {
				continue;
			}
			result = result || canRejected(source, parent);
		}
		return result;
	}
public static boolean canRejected(NodeModel current, NodeModel parent) {
		if(parent instanceof TaskModel && !((TaskModel)parent).isPerformAny()) {
			return false;
		}
        boolean result = false;
		for(TransitionModel tm : current.getInputs()) {
			NodeModel source = tm.getSource();
			if(source == parent) {
				return true;
			}
			if(source instanceof ForkModel
					|| source instanceof JoinModel
					|| source instanceof SubProcessModel
					|| source instanceof StartModel) {
				continue;
			}
			result = result || canRejected(source, parent);
		}
		return result;
	}
public static boolean canRejected ( NodeModel current , NodeModel parent ) { if ( parent instanceof TaskModel && ! ( ( TaskModel ) parent ) . isPerformAny ( ) ) { return false ; } boolean result = false ; for ( TransitionModel tm : current . getInputs ( ) ) { NodeModel source = tm . getSource ( ) ; if ( source == parent ) { return true ; } if ( source instanceof ForkModel || source instanceof JoinModel || source instanceof SubProcessModel || source instanceof StartModel ) { continue ; } result = result || canRejected ( source , parent ) ; } return result ; }
根据父节点模型、当前节点模型判断是否可退回。可退回条件：
1、满足中间无fork、join、subprocess模型
2、满足父节点模型如果为任务模型时，参与类型为any
@param parent 父节点模型
@return 是否可以退回
根据父节点模型、当前节点模型判断是否可退回。可退回条件： 1、满足中间无fork、join、subprocess模型 2、满足父节点模型如果为任务模型时，参与类型为any