mirror of
https://gitee.com/dromara/liteFlow.git
synced 2026-05-18 05:48:09 +08:00
初步完成 liteflow-solon-plugin 适配
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.yomahub.liteflow.solon;
|
||||
|
||||
|
||||
import org.noear.solon.Utils;
|
||||
import org.noear.solon.annotation.Configuration;
|
||||
import org.noear.solon.annotation.Inject;
|
||||
|
||||
@@ -84,7 +85,11 @@ public class LiteflowProperty {
|
||||
}
|
||||
|
||||
public void setRuleSource(String ruleSource) {
|
||||
this.ruleSource = ruleSource;
|
||||
if (ruleSource.contains("*")) {
|
||||
this.ruleSource = String.join(",", Utils.resolvePaths(ruleSource));
|
||||
} else {
|
||||
this.ruleSource = ruleSource;
|
||||
}
|
||||
}
|
||||
|
||||
public int getSlotSize() {
|
||||
|
||||
@@ -48,19 +48,18 @@ public class XPluginImpl implements Plugin {
|
||||
node1.setNodeId(nodeId);
|
||||
node1.setType(anno.nodeType());
|
||||
|
||||
FlowBus.addSpringScanNode(bw.name(), node1);
|
||||
FlowBus.addSpringScanNode(nodeId, node1);
|
||||
});
|
||||
|
||||
context.beanBuilderAdd(LiteflowComponent.class, (clz, bw, anno) -> {
|
||||
if(NodeComponent.class.isAssignableFrom(clz)) {
|
||||
NodeComponent node1 = bw.raw();
|
||||
String id1 = Utils.annoAlias(anno.id(), anno.value());
|
||||
String name1 =Utils.annoAlias(anno.name(), id1);
|
||||
String nodeId = Utils.annoAlias(anno.id(), anno.value());
|
||||
|
||||
node1.setNodeId(id1);
|
||||
node1.setName(name1);
|
||||
node1.setNodeId(nodeId);
|
||||
node1.setName(anno.name());
|
||||
|
||||
FlowBus.addSpringScanNode(node1.getNodeId(), node1);
|
||||
FlowBus.addSpringScanNode(nodeId, node1);
|
||||
}else{
|
||||
context.beanExtract(bw); //尝试提取 LiteflowMethod 函数
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user