feat: 执行器runner基本搭建完成 + drone ci/cd
This commit is contained in:
@@ -32,7 +32,7 @@ public interface BaseAppConvert {
|
||||
* @return {@link App }
|
||||
*/
|
||||
@Mappings({
|
||||
@Mapping(target = "graph", expression = "java(com.alibaba.fastjson2.JSON.parseObject(baseApp.getGraphJson(), com.metis.flow.domain.entity.bo.Graph.class))"),
|
||||
@Mapping(target = "graph", expression = "java(com.alibaba.fastjson2.JSON.parseObject(baseApp.getGraphJson(), com.metis.flow.domain.bo.Graph.class))"),
|
||||
@Mapping(target = "workflowId", source = "id")
|
||||
})
|
||||
App toApp(BaseApp baseApp);
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
package com.metis.flow.engine;
|
||||
|
||||
public interface AppEngineRunnerService {
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
package com.metis.flow;
|
||||
@@ -9,14 +9,14 @@ import java.util.concurrent.ConcurrentHashMap;
|
||||
|
||||
public class NodeValidatorFactory {
|
||||
|
||||
private static final Map<NodeType, NodeValidator<Object>> MAP = new ConcurrentHashMap<>(8);
|
||||
private static final Map<NodeType, NodeValidator> MAP = new ConcurrentHashMap<>(8);
|
||||
|
||||
/**
|
||||
* 注册
|
||||
*
|
||||
* @param validator 验证器
|
||||
*/
|
||||
public static void register(NodeValidator<Object> validator) {
|
||||
public static void register(NodeValidator validator) {
|
||||
MAP.put(validator.getType(), validator);
|
||||
}
|
||||
|
||||
@@ -24,10 +24,10 @@ public class NodeValidatorFactory {
|
||||
* 得到
|
||||
*
|
||||
* @param type 类型
|
||||
* @return {@link NodeValidator }<{@link T }>
|
||||
* @return {@link NodeValidator }
|
||||
*/
|
||||
public static <T> NodeValidator<T> get(NodeType type) {
|
||||
return (NodeValidator<T>) MAP.get(type);
|
||||
public static NodeValidator get(NodeType type) {
|
||||
return MAP.get(type);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -61,7 +61,7 @@ public class ValidatorServiceImpl implements ValidatorService {
|
||||
List<String> errorMessage = new ArrayList<>();
|
||||
for (Node node : nodes) {
|
||||
NodeType type = node.getType();
|
||||
NodeValidator<Object> validator = NodeValidatorFactory.get(type);
|
||||
NodeValidator validator = NodeValidatorFactory.get(type);
|
||||
// 节点校验器
|
||||
Assert.isTrue(ObjectUtil.isNotNull(validator), "无:{}类型的节点校验器", type.getName());
|
||||
ValidatorResult result = validator.validate(node);
|
||||
|
||||
Reference in New Issue
Block a user