代码调整
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
package com.njcn.prepare.liteflow;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.njcn.prepare.bo.CalculatedParam;
|
||||
import com.yomahub.liteflow.core.NodeComponent;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
* @author hongawen
|
||||
* @version 1.0.0
|
||||
* @date 2023年11月03日 14:42
|
||||
*/
|
||||
public abstract class NjcnNodeComponent extends NodeComponent {
|
||||
|
||||
/***
|
||||
* 判断是否进入该节点
|
||||
* 1、全链路执行时
|
||||
* 2、非全链路执行,但是需要执行的tag集合中包含了当前tag
|
||||
*/
|
||||
@Override
|
||||
public boolean isAccess() {
|
||||
String tag = this.getTag();
|
||||
if (StrUtil.isBlank(tag)) {
|
||||
//没有指定tag的,使用node自己的名称判断
|
||||
tag = this.getNodeId();
|
||||
}
|
||||
CalculatedParam requestData = this.getRequestData();
|
||||
Set<String> tagNames = requestData.getTagNames();
|
||||
if (requestData.isFullChain() || (CollectionUtil.isNotEmpty(tagNames) && tagNames.contains(tag))) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user