class SwitchCondition extends Condition {

	private final String TAG_PREFIX = "tag";

	private final String TAG_FLAG = ":";

	@Override
	public void executeCondition(Integer slotIndex) throws Exception {<FILL_FUNCTION_BODY>}

	@Override
	public ConditionTypeEnum getConditionType() {
		return ConditionTypeEnum.TYPE_SWITCH;
	}

	public void addTargetItem(Executable executable) {
		this.addExecutable(ConditionKey.SWITCH_TARGET_KEY, executable);
	}

	public List<Executable> getTargetList() {
		return this.getExecutableList(ConditionKey.SWITCH_TARGET_KEY);
	}

	public void setSwitchNode(Node switchNode) {
		this.addExecutable(ConditionKey.SWITCH_KEY, switchNode);
	}

	public Node getSwitchNode() {
		return (Node) this.getExecutableOne(ConditionKey.SWITCH_KEY);
	}

	public Executable getDefaultExecutor() {
		return this.getExecutableOne(ConditionKey.SWITCH_DEFAULT_KEY);
	}

	public void setDefaultExecutor(Executable defaultExecutor) {
		this.addExecutable(ConditionKey.SWITCH_DEFAULT_KEY, defaultExecutor);
	}

}

		// 获取switch node
		Node switchNode = this.getSwitchNode();
		// 获取target List
		List<Executable> targetList = this.getTargetList();

		// 提前设置 chainId，避免无法在 isAccess 方法中获取到
		switchNode.setCurrChainId(this.getCurrChainId());

		// 先去判断isAccess方法，如果isAccess方法都返回false，整个SWITCH表达式不执行
		if (!switchNode.isAccess(slotIndex)) {
			return;
		}

		// 先执行switch节点
		switchNode.execute(slotIndex);

		// 拿到switch节点的结果
		String targetId = switchNode.getItemResultMetaValue(slotIndex);

		Slot slot = DataBus.getSlot(slotIndex);

		Executable targetExecutor = null;
		if (StrUtil.isNotBlank(targetId)) {
			// 这里要判断是否使用tag模式跳转
			if (targetId.contains(TAG_FLAG)) {
				String[] target = targetId.split(TAG_FLAG, 2);
				String _targetId = target[0];
				String _targetTag = target[1];
				targetExecutor = targetList.stream().filter(executable -> {
					return (StrUtil.startWith(_targetId, TAG_PREFIX) && ObjectUtil.equal(_targetTag,executable.getTag()))
							|| ((StrUtil.isEmpty(_targetId) || _targetId.equals(executable.getId()))
							&& (StrUtil.isEmpty(_targetTag) || _targetTag.equals(executable.getTag())));
				}).findFirst().orElse(null);
			}
			else {
				targetExecutor = targetList.stream()
					.filter(executable -> ObjectUtil.equal(executable.getId(),targetId) )
					.findFirst()
					.orElse(null);
			}
		}

		if (ObjectUtil.isNull(targetExecutor)) {
			// 没有匹配到执行节点，则走默认的执行节点
			targetExecutor = this.getDefaultExecutor();
		}

		if (ObjectUtil.isNotNull(targetExecutor)) {
			// switch的目标不能是Pre节点或者Finally节点
			if (targetExecutor instanceof PreCondition || targetExecutor instanceof FinallyCondition) {
				String errorInfo = StrUtil.format(
						"[{}]:switch component[{}] error, switch target node cannot be pre or finally",
						slot.getRequestId(), this.getSwitchNode().getInstance().getDisplayName());
				throw new SwitchTargetCannotBePreOrFinallyException(errorInfo);
			}
			targetExecutor.setCurrChainId(this.getCurrChainId());
			targetExecutor.execute(slotIndex);
		}
		else {
			String errorInfo = StrUtil.format("[{}]:no target node find for the component[{}],target str is [{}]",
					slot.getRequestId(), this.getSwitchNode().getInstance().getDisplayName(), targetId);
			throw new NoSwitchTargetNodeException(errorInfo);
		}
	
<methods>public non-sealed void <init>() ,public void addExecutable(com.yomahub.liteflow.flow.element.Executable) ,public void addExecutable(java.lang.String, com.yomahub.liteflow.flow.element.Executable) ,public void execute(java.lang.Integer) throws java.lang.Exception,public abstract void executeCondition(java.lang.Integer) throws java.lang.Exception,public List<com.yomahub.liteflow.flow.element.Node> getAllNodeInCondition() ,public abstract com.yomahub.liteflow.enums.ConditionTypeEnum getConditionType() ,public java.lang.String getCurrChainId() ,public java.lang.String getCurrChainName() ,public Map<java.lang.String,List<com.yomahub.liteflow.flow.element.Executable>> getExecutableGroup() ,public List<com.yomahub.liteflow.flow.element.Executable> getExecutableList() ,public List<com.yomahub.liteflow.flow.element.Executable> getExecutableList(java.lang.String) ,public com.yomahub.liteflow.flow.element.Executable getExecutableOne(java.lang.String) ,public com.yomahub.liteflow.enums.ExecuteableTypeEnum getExecuteType() ,public java.lang.String getId() ,public java.lang.String getTag() ,public void setCurrChainId(java.lang.String) ,public void setExecutableList(List<com.yomahub.liteflow.flow.element.Executable>) ,public void setId(java.lang.String) ,public void setTag(java.lang.String) <variables>private java.lang.String currChainId,private final Map<java.lang.String,List<com.yomahub.liteflow.flow.element.Executable>> executableGroup,private java.lang.String id,private java.lang.String tag