mirror of
https://gitee.com/dromara/liteFlow.git
synced 2026-05-14 20:22:07 +08:00
enhancement: #I1W8OW 提一个需求点:一个组件出错能记录一些重要信息
This commit is contained in:
@@ -11,6 +11,7 @@ import java.text.MessageFormat;
|
|||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.yomahub.liteflow.core.NodeComponent;
|
import com.yomahub.liteflow.core.NodeComponent;
|
||||||
import com.yomahub.liteflow.entity.data.DataBus;
|
import com.yomahub.liteflow.entity.data.DataBus;
|
||||||
import com.yomahub.liteflow.entity.data.Slot;
|
import com.yomahub.liteflow.entity.data.Slot;
|
||||||
@@ -88,8 +89,8 @@ public class Node implements Executable{
|
|||||||
instance.execute();
|
instance.execute();
|
||||||
|
|
||||||
if(instance.isEnd()){
|
if(instance.isEnd()){
|
||||||
LOG.info("[{}]:component[{}] lead the chain to end",slot.getRequestId(),instance.getClass().getSimpleName());
|
String errorInfo = StrUtil.format("[{}]:component[{}] lead the chain to end",slot.getRequestId(),instance.getClass().getSimpleName());
|
||||||
throw new ChainEndException("component lead the chain to end");
|
throw new ChainEndException(errorInfo);
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
LOG.info("[{}]:[X]skip component[{}] execution",slot.getRequestId(),instance.getClass().getSimpleName());
|
LOG.info("[{}]:[X]skip component[{}] execution",slot.getRequestId(),instance.getClass().getSimpleName());
|
||||||
|
|||||||
Reference in New Issue
Block a user