mirror of
https://gitee.com/dromara/liteFlow.git
synced 2026-05-14 20:22:07 +08:00
在slot里面加入chainName
This commit is contained in:
@@ -102,6 +102,7 @@ public class FlowExecutor {
|
||||
|
||||
if(!isInnerChain) {
|
||||
slot.setRequestData(param);
|
||||
slot.setChainName(chainId);
|
||||
}else {
|
||||
slot.setChainReqData(chainId, param);
|
||||
}
|
||||
|
||||
@@ -28,6 +28,8 @@ public abstract class AbsSlot implements Slot{
|
||||
|
||||
private final String RESPONSE = "response";
|
||||
|
||||
private final String CHAINNAME = "chain_name";
|
||||
|
||||
private final String COND_NODE_PREFIX = "cond_";
|
||||
|
||||
private final String NODE_INPUT_PREFIX = "input_";
|
||||
@@ -98,6 +100,14 @@ public abstract class AbsSlot implements Slot{
|
||||
return (T)dataMap.get(COND_NODE_PREFIX + key);
|
||||
}
|
||||
|
||||
public void setChainName(String chainName) {
|
||||
dataMap.put(CHAINNAME, chainName);
|
||||
}
|
||||
|
||||
public String getChainName() {
|
||||
return (String)dataMap.get(CHAINNAME);
|
||||
}
|
||||
|
||||
public void addStep(CmpStep step){
|
||||
CmpStep lastStep = this.executeSteps.peekLast();
|
||||
if(lastStep != null && lastStep.equals(step)) {
|
||||
@@ -117,7 +127,7 @@ public abstract class AbsSlot implements Slot{
|
||||
str.append("==>");
|
||||
}
|
||||
}
|
||||
LOG.info("[{}]:{}",getRequestId(),str.toString());
|
||||
LOG.info("[{}]:CHAIN_NAME[{}]\n{}",getRequestId(),str.toString());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -45,4 +45,8 @@ public interface Slot {
|
||||
public void generateRequestId();
|
||||
|
||||
public String getRequestId();
|
||||
|
||||
public void setChainName(String chainName);
|
||||
|
||||
public String getChainName();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user