bug #I5AVD2 新版本2.7.0中,全局切面中拿不到组件的别名了

This commit is contained in:
everywhere.z
2022-06-07 00:43:16 +08:00
parent 803e6a5fee
commit 9a63e34b43
6 changed files with 46 additions and 18 deletions

View File

@@ -7,12 +7,14 @@ import com.yomahub.liteflow.slot.Slot;
public class CmpAspect implements ICmpAroundAspect<DefaultContext> {
@Override
public void beforeProcess(String nodeId, DefaultContext contextBean) {
contextBean.setData(nodeId, "before");
public void beforeProcess(String nodeId, Slot<DefaultContext> slot) {
DefaultContext context = slot.getContextBean();
context.setData(nodeId, "before");
}
@Override
public void afterProcess(String nodeId, DefaultContext contextBean) {
contextBean.setData(nodeId, StrUtil.format("{}_{}", contextBean.getData(nodeId), "after"));
public void afterProcess(String nodeId, Slot<DefaultContext> slot) {
DefaultContext context = slot.getContextBean();
context.setData(nodeId, StrUtil.format("{}_{}", context.getData(nodeId), "after"));
}
}