..
This commit is contained in:
@@ -9,8 +9,6 @@ import com.budwk.app.flow.engine.parser.impl.*;
|
||||
/**
|
||||
*
|
||||
* 流程引擎配置类
|
||||
* @author mldong
|
||||
* @date 2022/6/12
|
||||
*/
|
||||
public class Configuration {
|
||||
public Configuration() {
|
||||
|
||||
@@ -16,8 +16,6 @@ import java.util.stream.Collectors;
|
||||
/**
|
||||
*
|
||||
* 执行对象参数
|
||||
* @author mldong
|
||||
* @date 2023/4/25
|
||||
*/
|
||||
@Data
|
||||
public class Execution {
|
||||
|
||||
@@ -27,9 +27,6 @@ import java.util.List;
|
||||
|
||||
/**
|
||||
* 工作流引擎实现
|
||||
*
|
||||
* @author mldong
|
||||
* @date 2023/5/29
|
||||
*/
|
||||
public class FlowEngineImpl implements FlowEngine {
|
||||
protected Configuration configuration;
|
||||
|
||||
@@ -8,8 +8,6 @@ import java.util.List;
|
||||
/**
|
||||
*
|
||||
* 单例服务上下文
|
||||
* @author mldong
|
||||
* @date 2022/6/12
|
||||
*/
|
||||
public class ServiceContext {
|
||||
private static Context context;
|
||||
|
||||
@@ -6,8 +6,6 @@ import lombok.Data;
|
||||
|
||||
/**
|
||||
* 流程开始事件
|
||||
* @author mldong
|
||||
* @date 2023/12/5
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
|
||||
@@ -2,8 +2,6 @@ package com.budwk.app.flow.engine.event;
|
||||
|
||||
/**
|
||||
* 流程事件监听接口
|
||||
* @author mldong
|
||||
* @date 2023/12/5
|
||||
*/
|
||||
public interface ProcessEventListener {
|
||||
void onEvent(ProcessEvent event);
|
||||
|
||||
@@ -6,8 +6,6 @@ import java.util.List;
|
||||
|
||||
/**
|
||||
* 流程事件发布者类
|
||||
* @author mldong
|
||||
* @date 2023/12/5
|
||||
*/
|
||||
public class ProcessPublisher {
|
||||
// 事件通知方法
|
||||
|
||||
@@ -5,8 +5,6 @@ import com.budwk.app.flow.engine.core.Execution;
|
||||
|
||||
/**
|
||||
* 流程各模型操作处理接口
|
||||
* @author mldong
|
||||
* @date 2023/5/17
|
||||
*/
|
||||
public interface IHandler {
|
||||
/**
|
||||
|
||||
@@ -16,8 +16,6 @@ import java.util.stream.Collectors;
|
||||
/**
|
||||
* 会签任务处理,用于判断会签任务是否可通过
|
||||
*
|
||||
* @author mldong
|
||||
* @date 2023/11/24
|
||||
*/
|
||||
public class CountersignHandler implements IHandler {
|
||||
private TaskModel taskModel;
|
||||
|
||||
@@ -16,8 +16,6 @@ import java.util.List;
|
||||
|
||||
/**
|
||||
* 创建任务处理器
|
||||
* @author mldong
|
||||
* @date 2023/5/16
|
||||
*/
|
||||
public class CreateTaskHandler implements IHandler {
|
||||
private TaskModel taskModel;
|
||||
|
||||
@@ -14,10 +14,7 @@ import com.budwk.app.flow.enums.ProcessEventTypeEnum;
|
||||
import com.budwk.app.flow.enums.ProcessSubmitTypeEnum;
|
||||
|
||||
/**
|
||||
*
|
||||
* 结束流程实例的处理器
|
||||
* @author mldong
|
||||
* @date 2023/5/29
|
||||
*/
|
||||
public class EndProcessHandler implements IHandler {
|
||||
private EndModel endModel;
|
||||
|
||||
@@ -11,8 +11,6 @@ import java.util.List;
|
||||
|
||||
/**
|
||||
* 合并分支操作的处理器
|
||||
* @author mldong
|
||||
* @date 2023/5/21
|
||||
*/
|
||||
public class MergeBranchHandler implements IHandler {
|
||||
private JoinModel joinModel;
|
||||
|
||||
@@ -9,9 +9,6 @@ import com.budwk.app.flow.entity.ProcessDefine;
|
||||
|
||||
/**
|
||||
* 启动子流程处理类
|
||||
*
|
||||
* @author mldong
|
||||
* @date 2023/12/7
|
||||
*/
|
||||
public class StartSubProcessHandler implements IHandler {
|
||||
private SubProcessModel model;
|
||||
|
||||
@@ -12,8 +12,6 @@ import java.util.Map;
|
||||
/**
|
||||
*
|
||||
* 简单的上下文发现实现类
|
||||
* @author mldong
|
||||
* @date 2023/4/26
|
||||
*/
|
||||
public class SimpleContext implements Context {
|
||||
private Dict dict = Dict.create();
|
||||
|
||||
@@ -16,8 +16,6 @@ import java.util.List;
|
||||
/**
|
||||
* 任务拦截器,处理代理人
|
||||
*
|
||||
* @author mldong
|
||||
* @date 2023/12/6
|
||||
*/
|
||||
@IocBean
|
||||
public class SurrogateInterceptor implements FlowInterceptor {
|
||||
|
||||
@@ -14,6 +14,7 @@ import com.budwk.app.sys.views.View_user;
|
||||
import org.dromara.warm.flow.core.exception.FlowException;
|
||||
import org.nutz.dao.Cnd;
|
||||
import org.nutz.dao.Dao;
|
||||
import org.nutz.lang.util.NutMap;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
@@ -22,8 +23,6 @@ import java.util.concurrent.atomic.AtomicBoolean;
|
||||
/**
|
||||
* 流程工具
|
||||
*
|
||||
* @author mldong
|
||||
* @date 2023/10/7
|
||||
*/
|
||||
public class FlowUtil {
|
||||
private FlowUtil() {
|
||||
@@ -83,6 +82,19 @@ public class FlowUtil {
|
||||
return Dict.create();
|
||||
}
|
||||
|
||||
/**
|
||||
* 参数转字典
|
||||
*
|
||||
* @param variable
|
||||
* @return
|
||||
*/
|
||||
public static NutMap variableToNutMap(String variable) {
|
||||
if (JSONUtil.isTypeJSON(variable)) {
|
||||
return NutMap.WRAP(JSONUtil.parseObj(variable));
|
||||
}
|
||||
return NutMap.NEW();
|
||||
}
|
||||
|
||||
/**
|
||||
* 判断是否为第一个任务节点
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user