From 6682c8d9fed75e1178973f4db207a8aaa4d1ea1d Mon Sep 17 00:00:00 2001 From: PandaGoAdmin <18610165312@163.com> Date: Fri, 24 Mar 2023 14:40:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- pkg/rule_engine/instance.go | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5b01b95..d113fc5 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ --- 系统在线文档 --- -* 文档地址 :https://xm-go.gitee.io/pandax-docs/ +* 文档地址 :http://www.pandazhuan.cn/ **> 未来会补充文档和视频,方便友友们使用!** diff --git a/pkg/rule_engine/instance.go b/pkg/rule_engine/instance.go index f5084d4..81ca10b 100644 --- a/pkg/rule_engine/instance.go +++ b/pkg/rule_engine/instance.go @@ -7,6 +7,7 @@ import ( "pandax/pkg/rule_engine/manifest" "pandax/pkg/rule_engine/message" "pandax/pkg/rule_engine/nodes" + "strings" ) // ruleChainInstance is rulechain's runtime instance that manage all nodes in this chain, @@ -62,7 +63,11 @@ func newInstanceWithManifest(m *manifest.Manifest) (*ruleChainInstance, []error) errs = append(errs, err) continue } - originalNode.AddLinkedNode(edge.Properties["type"].(string), targetNode) + //可以有多个类型 + split := strings.Split(edge.Properties["type"].(string), "/") + for _, ty := range split { + originalNode.AddLinkedNode(ty, targetNode) + } } for name, node := range r.nodes { targetNodes := node.GetLinkedNodes()